Class: Cadenya::Types::CreateWorkspaceSecretRequest

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) ⇒ CreateWorkspaceSecretRequest

Returns a new instance of CreateWorkspaceSecretRequest.



2039
2040
2041
2042
2043
# File 'lib/cadenya/types.rb', line 2039

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

Instance Attribute Details

#metadataObject (readonly)

Returns the value of attribute metadata.



2037
2038
2039
# File 'lib/cadenya/types.rb', line 2037

def 
  @metadata
end

#specObject (readonly)

Returns the value of attribute spec.



2037
2038
2039
# File 'lib/cadenya/types.rb', line 2037

def spec
  @spec
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



2037
2038
2039
# File 'lib/cadenya/types.rb', line 2037

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



2045
2046
2047
2048
2049
2050
2051
# File 'lib/cadenya/types.rb', line 2045

def self.from_json(data)
  new(
    workspace_id: data["workspaceId"],
    metadata: data["metadata"].nil? ? nil : Types::CreateResourceMetadata.from_json(data["metadata"]),
    spec: data["spec"].nil? ? nil : Types::WorkspaceSecretSpec.from_json(data["spec"]),
  )
end

Instance Method Details

#to_hObject



2053
2054
2055
2056
2057
2058
2059
# File 'lib/cadenya/types.rb', line 2053

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