Class: PutApisAPIIDCollectionsCollectionIDSyncWithSchemaTasksResponse401

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



28161
28162
28163
28164
28165
28166
28167
28168
28169
28170
# File 'lib/schemas.rb', line 28161

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    detail:                                                                            d["detail"],
    instance:                                                                          d["instance"],
    status:                                                                            d["status"],
    title:                                                                             d["title"],
    put_apis_api_id_collections_collection_id_sync_with_schema_tasks_response401_type: d["type"],
  )
end

.from_json!(json) ⇒ Object



28172
28173
28174
# File 'lib/schemas.rb', line 28172

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

Instance Method Details

#to_dynamicObject



28176
28177
28178
28179
28180
28181
28182
28183
28184
# File 'lib/schemas.rb', line 28176

def to_dynamic
  {
    "detail"   => detail,
    "instance" => instance,
    "status"   => status,
    "title"    => title,
    "type"     => put_apis_api_id_collections_collection_id_sync_with_schema_tasks_response401_type,
  }
end

#to_json(options = nil) ⇒ Object



28186
28187
28188
# File 'lib/schemas.rb', line 28186

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