Class: Cadenya::Types::UpdateWorkspaceRequest

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(workspace_id: nil, metadata: nil, spec: nil, update_mask: nil) ⇒ UpdateWorkspaceRequest

Returns a new instance of UpdateWorkspaceRequest.



6989
6990
6991
6992
6993
6994
# File 'lib/cadenya/types.rb', line 6989

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

Instance Attribute Details

#metadataObject (readonly)

Returns the value of attribute metadata.



6987
6988
6989
# File 'lib/cadenya/types.rb', line 6987

def 
  @metadata
end

#specObject (readonly)

Returns the value of attribute spec.



6987
6988
6989
# File 'lib/cadenya/types.rb', line 6987

def spec
  @spec
end

#update_maskObject (readonly)

Returns the value of attribute update_mask.



6987
6988
6989
# File 'lib/cadenya/types.rb', line 6987

def update_mask
  @update_mask
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



6987
6988
6989
# File 'lib/cadenya/types.rb', line 6987

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



6996
6997
6998
6999
7000
7001
7002
7003
# File 'lib/cadenya/types.rb', line 6996

def self.from_json(data)
  new(
    workspace_id: data["workspaceId"],
    metadata: data["metadata"].nil? ? nil : Types::UpdateAccountResourceMetadata.from_json(data["metadata"]),
    spec: data["spec"].nil? ? nil : Types::WorkspaceSpec.from_json(data["spec"]),
    update_mask: data["updateMask"],
  )
end

Instance Method Details

#to_hObject



7005
7006
7007
7008
7009
7010
7011
7012
# File 'lib/cadenya/types.rb', line 7005

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