Class: ScalarGalaxy::Models::NewPlanetWebhookEvent::Atmosphere

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/galaxy-ruby/models/new_planet_webhook_event.rb,
sig/galaxy-ruby/models/new_planet_webhook_event.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, name:, atmosphere: nil, creator: nil, description: nil, discovered_at: nil, failure_callback_url: nil, habitability_index: nil, image: nil, last_updated: nil, physical_properties: nil, satellites: nil, success_callback_url: nil, tags: nil, type: nil) ⇒ Atmosphere

Returns a new instance of Atmosphere.

Parameters:

  • id (Integer)
  • name (String)
  • atmosphere (Array<ScalarGalaxy::Models::NewPlanetWebhookEvent::Atmosphere>) (defaults to: nil)

    Atmospheric composition

  • creator (ScalarGalaxy::Models::User) (defaults to: nil)

    A user

  • description (String, nil) (defaults to: nil)
  • discovered_at (Time) (defaults to: nil)
  • failure_callback_url (String) (defaults to: nil)

    URL which gets invoked upon a failed operation

  • habitability_index (Float) (defaults to: nil)

    A score from 0 to 1 indicating potential habitability

  • image (String, nil) (defaults to: nil)
  • last_updated (Time) (defaults to: nil)
  • physical_properties (ScalarGalaxy::Models::NewPlanetWebhookEvent::PhysicalProperties) (defaults to: nil)
  • satellites (Array<Object>) (defaults to: nil)
  • success_callback_url (String) (defaults to: nil)

    URL which gets invoked upon a successful operation

  • tags (Array<String>) (defaults to: nil)
  • type (Symbol, ScalarGalaxy::Models::NewPlanetWebhookEvent::Type) (defaults to: nil)
  • compound: (String)
  • percentage: (Float)


122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/galaxy-ruby/models/new_planet_webhook_event.rb', line 122

class Atmosphere < ScalarGalaxy::Internal::Type::BaseModel
  # @!attribute compound
  #
  #   @return [String, nil]
  optional :compound, String

  # @!attribute percentage
  #
  #   @return [Float, nil]
  optional :percentage, Float

  # @!method initialize(compound: nil, percentage: nil)
  #   @param compound [String]
  #   @param percentage [Float]
end

Instance Attribute Details

#compoundString?

Parameters:

  • (String)

Returns:

  • (String, nil)


126
# File 'lib/galaxy-ruby/models/new_planet_webhook_event.rb', line 126

optional :compound, String

#percentageFloat?

Parameters:

  • (Float)

Returns:

  • (Float, nil)


131
# File 'lib/galaxy-ruby/models/new_planet_webhook_event.rb', line 131

optional :percentage, Float

Instance Method Details

#to_hash{ compound: String, percentage: Float }

Returns:

  • ({ compound: String, percentage: Float })


130
# File 'sig/galaxy-ruby/models/new_planet_webhook_event.rbs', line 130

def to_hash: -> { compound: String, percentage: Float }