Class: Cadenya::Types::CreateWorkspaceRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metadata: nil, spec: nil) ⇒ CreateWorkspaceRequest

Returns a new instance of CreateWorkspaceRequest.



2016
2017
2018
2019
# File 'lib/cadenya/types.rb', line 2016

def initialize(metadata: nil, spec: nil)
  @metadata = 
  @spec = spec
end

Instance Attribute Details

#metadataObject (readonly)

Returns the value of attribute metadata.



2014
2015
2016
# File 'lib/cadenya/types.rb', line 2014

def 
  @metadata
end

#specObject (readonly)

Returns the value of attribute spec.



2014
2015
2016
# File 'lib/cadenya/types.rb', line 2014

def spec
  @spec
end

Class Method Details

.from_json(data) ⇒ Object



2021
2022
2023
2024
2025
2026
# File 'lib/cadenya/types.rb', line 2021

def self.from_json(data)
  new(
    metadata: data["metadata"].nil? ? nil : Types::CreateAccountResourceMetadata.from_json(data["metadata"]),
    spec: data["spec"].nil? ? nil : Types::WorkspaceSpec.from_json(data["spec"]),
  )
end

Instance Method Details

#to_hObject



2028
2029
2030
2031
2032
2033
# File 'lib/cadenya/types.rb', line 2028

def to_h
  {
    metadata: Util.plain(@metadata),
    spec: Util.plain(@spec),
  }.reject { |_k, v| v.nil? }
end