Class: Cadenya::Types::CreateWidgetSessionRequest

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, secrets: nil) ⇒ CreateWidgetSessionRequest

Returns a new instance of CreateWidgetSessionRequest.



1964
1965
1966
1967
1968
1969
# File 'lib/cadenya/types.rb', line 1964

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

Instance Attribute Details

#metadataObject (readonly)

Returns the value of attribute metadata.



1962
1963
1964
# File 'lib/cadenya/types.rb', line 1962

def 
  @metadata
end

#secretsObject (readonly)

Returns the value of attribute secrets.



1962
1963
1964
# File 'lib/cadenya/types.rb', line 1962

def secrets
  @secrets
end

#specObject (readonly)

Returns the value of attribute spec.



1962
1963
1964
# File 'lib/cadenya/types.rb', line 1962

def spec
  @spec
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



1962
1963
1964
# File 'lib/cadenya/types.rb', line 1962

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



1971
1972
1973
1974
1975
1976
1977
1978
# File 'lib/cadenya/types.rb', line 1971

def self.from_json(data)
  new(
    workspace_id: data["workspaceId"],
    metadata: data["metadata"].nil? ? nil : Types::CreateOperationMetadata.from_json(data["metadata"]),
    spec: data["spec"].nil? ? nil : Types::WidgetSessionSpec.from_json(data["spec"]),
    secrets: data["secrets"].nil? ? nil : (data["secrets"]).map { |item| Types::CreateWidgetSessionRequest_Secret.from_json(item) },
  )
end

Instance Method Details

#to_hObject



1980
1981
1982
1983
1984
1985
1986
1987
# File 'lib/cadenya/types.rb', line 1980

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