Class: PutWorkspacesWorkspaceIDTagsResponse

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



35306
35307
35308
35309
35310
35311
# File 'lib/schemas.rb', line 35306

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    tags: d["tags"]&.map { |x| PutWorkspacesWorkspaceIDTagsResponseTagsItem.from_dynamic!(x) },
  )
end

.from_json!(json) ⇒ Object



35313
35314
35315
# File 'lib/schemas.rb', line 35313

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

Instance Method Details

#to_dynamicObject



35317
35318
35319
35320
35321
# File 'lib/schemas.rb', line 35317

def to_dynamic
  {
    "tags" => tags&.map { |x| x.to_dynamic },
  }
end

#to_json(options = nil) ⇒ Object



35323
35324
35325
# File 'lib/schemas.rb', line 35323

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