Class: Cadenya::Types::UpdateWidgetRequest

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, id: nil, metadata: nil, spec: nil, update_mask: nil) ⇒ UpdateWidgetRequest

Returns a new instance of UpdateWidgetRequest.



6957
6958
6959
6960
6961
6962
6963
# File 'lib/cadenya/types.rb', line 6957

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



6955
6956
6957
# File 'lib/cadenya/types.rb', line 6955

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



6955
6956
6957
# File 'lib/cadenya/types.rb', line 6955

def 
  @metadata
end

#specObject (readonly)

Returns the value of attribute spec.



6955
6956
6957
# File 'lib/cadenya/types.rb', line 6955

def spec
  @spec
end

#update_maskObject (readonly)

Returns the value of attribute update_mask.



6955
6956
6957
# File 'lib/cadenya/types.rb', line 6955

def update_mask
  @update_mask
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



6955
6956
6957
# File 'lib/cadenya/types.rb', line 6955

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



6965
6966
6967
6968
6969
6970
6971
6972
6973
# File 'lib/cadenya/types.rb', line 6965

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

Instance Method Details

#to_hObject



6975
6976
6977
6978
6979
6980
6981
6982
6983
# File 'lib/cadenya/types.rb', line 6975

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