Class: GetApisAPIIDSchemasSchemaIDFilesFilePathResponse

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



4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
# File 'lib/schemas.rb', line 4780

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    content:                                                         d["content"],
    created_at:                                                      d["createdAt"],
    created_by:                                                      d["createdBy"],
    id:                                                              d["id"],
    get_apis_api_id_schemas_schema_id_files_file_path_response_name: d["name"],
    path:                                                            d["path"],
    updated_at:                                                      d["updatedAt"],
    updated_by:                                                      d["updatedBy"],
  )
end

.from_json!(json) ⇒ Object



4794
4795
4796
# File 'lib/schemas.rb', line 4794

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

Instance Method Details

#to_dynamicObject



4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
# File 'lib/schemas.rb', line 4798

def to_dynamic
  {
    "content"   => content,
    "createdAt" => created_at,
    "createdBy" => created_by,
    "id"        => id,
    "name"      => get_apis_api_id_schemas_schema_id_files_file_path_response_name,
    "path"      => path,
    "updatedAt" => updated_at,
    "updatedBy" => updated_by,
  }
end

#to_json(options = nil) ⇒ Object



4811
4812
4813
# File 'lib/schemas.rb', line 4811

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