Class: PutEnvironmentsEnvironmentIDResponseEnvironment

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



32151
32152
32153
32154
32155
32156
32157
32158
# File 'lib/schemas.rb', line 32151

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    id:                                                        d["id"],
    put_environments_environment_id_response_environment_name: d["name"],
    uid:                                                       d["uid"],
  )
end

.from_json!(json) ⇒ Object



32160
32161
32162
# File 'lib/schemas.rb', line 32160

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

Instance Method Details

#to_dynamicObject



32164
32165
32166
32167
32168
32169
32170
# File 'lib/schemas.rb', line 32164

def to_dynamic
  {
    "id"   => id,
    "name" => put_environments_environment_id_response_environment_name,
    "uid"  => uid,
  }
end

#to_json(options = nil) ⇒ Object



32172
32173
32174
# File 'lib/schemas.rb', line 32172

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