Class: GetWorkspacesWorkspaceIDTagsResponse

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



17518
17519
17520
17521
17522
17523
# File 'lib/schemas.rb', line 17518

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

.from_json!(json) ⇒ Object



17525
17526
17527
# File 'lib/schemas.rb', line 17525

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

Instance Method Details

#to_dynamicObject



17529
17530
17531
17532
17533
# File 'lib/schemas.rb', line 17529

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

#to_json(options = nil) ⇒ Object



17535
17536
17537
# File 'lib/schemas.rb', line 17535

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