Class: GetEnvironmentsEnvironmentIDResponse

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



9715
9716
9717
9718
9719
9720
# File 'lib/schemas.rb', line 9715

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    environment: d["environment"] ? GetEnvironmentsEnvironmentIDResponseEnvironment.from_dynamic!(d["environment"]) : nil,
  )
end

.from_json!(json) ⇒ Object



9722
9723
9724
# File 'lib/schemas.rb', line 9722

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



9726
9727
9728
9729
9730
# File 'lib/schemas.rb', line 9726

def to_dynamic
  {
    "environment" => environment&.to_dynamic,
  }
end

#to_json(options = nil) ⇒ Object



9732
9733
9734
# File 'lib/schemas.rb', line 9732

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end