Class: GetWorkspacesWorkspaceIDResponseWorkspaceEnvironmentsItem

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



17041
17042
17043
17044
17045
17046
17047
17048
# File 'lib/schemas.rb', line 17041

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

.from_json!(json) ⇒ Object



17050
17051
17052
# File 'lib/schemas.rb', line 17050

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

Instance Method Details

#to_dynamicObject



17054
17055
17056
17057
17058
17059
17060
# File 'lib/schemas.rb', line 17054

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

#to_json(options = nil) ⇒ Object



17062
17063
17064
# File 'lib/schemas.rb', line 17062

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