Class: PutWorkspacesWorkspaceIDTagsBody

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



35252
35253
35254
35255
35256
35257
# File 'lib/schemas.rb', line 35252

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

.from_json!(json) ⇒ Object



35259
35260
35261
# File 'lib/schemas.rb', line 35259

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

Instance Method Details

#to_dynamicObject



35263
35264
35265
35266
35267
# File 'lib/schemas.rb', line 35263

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

#to_json(options = nil) ⇒ Object



35269
35270
35271
# File 'lib/schemas.rb', line 35269

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