Class: GetWorkspacesWorkspaceIDResponseWorkspaceApisItem

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



16967
16968
16969
16970
16971
16972
16973
16974
# File 'lib/schemas.rb', line 16967

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

.from_json!(json) ⇒ Object



16976
16977
16978
# File 'lib/schemas.rb', line 16976

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

Instance Method Details

#to_dynamicObject



16980
16981
16982
16983
16984
16985
16986
# File 'lib/schemas.rb', line 16980

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

#to_json(options = nil) ⇒ Object



16988
16989
16990
# File 'lib/schemas.rb', line 16988

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