Class: PutWorkspacesWorkspaceIDGlobalVariablesResponse

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



34867
34868
34869
34870
34871
34872
# File 'lib/schemas.rb', line 34867

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

.from_json!(json) ⇒ Object



34874
34875
34876
# File 'lib/schemas.rb', line 34874

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

Instance Method Details

#to_dynamicObject



34878
34879
34880
34881
34882
# File 'lib/schemas.rb', line 34878

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

#to_json(options = nil) ⇒ Object



34884
34885
34886
# File 'lib/schemas.rb', line 34884

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