Class: PutEnvironmentsEnvironmentIDResponse

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



32180
32181
32182
32183
32184
32185
# File 'lib/schemas.rb', line 32180

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

.from_json!(json) ⇒ Object



32187
32188
32189
# File 'lib/schemas.rb', line 32187

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

Instance Method Details

#to_dynamicObject



32191
32192
32193
32194
32195
# File 'lib/schemas.rb', line 32191

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

#to_json(options = nil) ⇒ Object



32197
32198
32199
# File 'lib/schemas.rb', line 32197

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