Class: Cadenya::Types::CreateObjectiveFeedbackRequest

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, objective_id: nil, metadata: nil, data: nil) ⇒ CreateObjectiveFeedbackRequest

Returns a new instance of CreateObjectiveFeedbackRequest.



1671
1672
1673
1674
1675
1676
# File 'lib/cadenya/types.rb', line 1671

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

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



1669
1670
1671
# File 'lib/cadenya/types.rb', line 1669

def data
  @data
end

#metadataObject (readonly)

Returns the value of attribute metadata.



1669
1670
1671
# File 'lib/cadenya/types.rb', line 1669

def 
  @metadata
end

#objective_idObject (readonly)

Returns the value of attribute objective_id.



1669
1670
1671
# File 'lib/cadenya/types.rb', line 1669

def objective_id
  @objective_id
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



1669
1670
1671
# File 'lib/cadenya/types.rb', line 1669

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



1678
1679
1680
1681
1682
1683
1684
1685
# File 'lib/cadenya/types.rb', line 1678

def self.from_json(data)
  new(
    workspace_id: data["workspaceId"],
    objective_id: data["objectiveId"],
    metadata: data["metadata"].nil? ? nil : Types::CreateOperationMetadata.from_json(data["metadata"]),
    data: data["data"].nil? ? nil : Types::ObjectiveFeedbackData.from_json(data["data"]),
  )
end

Instance Method Details

#to_hObject



1687
1688
1689
1690
1691
1692
1693
1694
# File 'lib/cadenya/types.rb', line 1687

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