Class: DemoApiScalarGalaxy::Models::Planet

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/amritk-galaxy-staging/models/planet.rb,
sig/amritk-galaxy-staging/models/planet.rbs

Overview

See Also:

  • DemoApiScalarGalaxy::Resources::Planets#create

Direct Known Subclasses

PlanetCreateParams, PlanetUpdateParams

Defined Under Namespace

Modules: Type Classes: Atmosphere, PhysicalProperties

Instance Attribute Summary collapse

Class Method 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(compound: nil, percentage: nil) ⇒ Object

Parameters:

  • compound (String) (defaults to: nil)
  • percentage (Float) (defaults to: nil)


# File 'lib/amritk-galaxy-staging/models/planet.rb', line 93

Instance Attribute Details

#atmosphere ⇒ Array<DemoApiScalarGalaxy::Models::Planet::Atmosphere>?

Atmospheric composition



21
22
# File 'lib/amritk-galaxy-staging/models/planet.rb', line 21

optional :atmosphere,
-> { DemoApiScalarGalaxy::Internal::Type::ArrayOf[DemoApiScalarGalaxy::Planet::Atmosphere] }

#creator ⇒ DemoApiScalarGalaxy::Models::User?

A user



28
# File 'lib/amritk-galaxy-staging/models/planet.rb', line 28

optional :creator, -> { DemoApiScalarGalaxy::User }

#description ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


33
# File 'lib/amritk-galaxy-staging/models/planet.rb', line 33

optional :description, String, nil?: true

#discovered_at ⇒ Time?

Parameters:

  • (Time)

Returns:

  • (Time, nil)


38
# File 'lib/amritk-galaxy-staging/models/planet.rb', line 38

optional :discovered_at, Time, api_name: :discoveredAt

#failure_callback_url ⇒ String?

URL which gets invoked upon a failed operation

Parameters:

  • (String)

Returns:

  • (String, nil)


44
# File 'lib/amritk-galaxy-staging/models/planet.rb', line 44

optional :failure_callback_url, String, api_name: :failureCallbackUrl

#habitability_index ⇒ Float?

A score from 0 to 1 indicating potential habitability

Parameters:

  • (Float)

Returns:

  • (Float, nil)


50
# File 'lib/amritk-galaxy-staging/models/planet.rb', line 50

optional :habitability_index, Float, api_name: :habitabilityIndex

#id ⇒ Integer

Returns the value of attribute id.

Returns:

  • (Integer)


23
24
25
# File 'sig/amritk-galaxy-staging/models/planet.rbs', line 23

def id
  @id
end

#image ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


55
# File 'lib/amritk-galaxy-staging/models/planet.rb', line 55

optional :image, String, nil?: true

#last_updated ⇒ Time? (readonly)

Returns the value of attribute last_updated.

Returns:

  • (Time, nil)


55
56
57
# File 'sig/amritk-galaxy-staging/models/planet.rbs', line 55

def last_updated
  @last_updated
end

#name ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/amritk-galaxy-staging/models/planet.rb', line 10

required :name, String

#physical_properties ⇒ DemoApiScalarGalaxy::Models::Planet::PhysicalProperties?



60
61
62
# File 'lib/amritk-galaxy-staging/models/planet.rb', line 60

optional :physical_properties,
-> { DemoApiScalarGalaxy::Planet::PhysicalProperties },
api_name: :physicalProperties

#satellites ⇒ Array<DemoApiScalarGalaxy::Models::Satellite>?



67
68
# File 'lib/amritk-galaxy-staging/models/planet.rb', line 67

optional :satellites,
-> { DemoApiScalarGalaxy::Internal::Type::ArrayOf[DemoApiScalarGalaxy::Satellite] }

#success_callback_url ⇒ String?

URL which gets invoked upon a successful operation

Parameters:

  • (String)

Returns:

  • (String, nil)


74
# File 'lib/amritk-galaxy-staging/models/planet.rb', line 74

optional :success_callback_url, String, api_name: :successCallbackUrl

#tags ⇒ Array<String>?

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


79
# File 'lib/amritk-galaxy-staging/models/planet.rb', line 79

optional :tags, DemoApiScalarGalaxy::Internal::Type::ArrayOf[String]

#type ⇒ Symbol, DemoApiScalarGalaxy::Models::Planet::Type

Parameters:

  • value (DemoApiScalarGalaxy::Models::Planet::type_)

Returns:



15
# File 'lib/amritk-galaxy-staging/models/planet.rb', line 15

required :type, enum: -> { DemoApiScalarGalaxy::Planet::Type }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/amritk-galaxy-staging/models/planet.rb', line 137

Instance Method Details

#last_updated= ⇒ Time (readonly)

Parameters:

  • (Time)

Returns:

  • (Time)


57
# File 'sig/amritk-galaxy-staging/models/planet.rbs', line 57

def last_updated=: (Time) -> Time

#to_hash ⇒ {

Returns:

  • ({)


97
# File 'sig/amritk-galaxy-staging/models/planet.rbs', line 97

def to_hash: -> {