Class: Cadenya::Types::ObjectiveFeedback

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(metadata: nil, data: nil, info: nil) ⇒ ObjectiveFeedback

Returns a new instance of ObjectiveFeedback.



3847
3848
3849
3850
3851
# File 'lib/cadenya/types.rb', line 3847

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

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



3845
3846
3847
# File 'lib/cadenya/types.rb', line 3845

def data
  @data
end

#infoObject (readonly)

Returns the value of attribute info.



3845
3846
3847
# File 'lib/cadenya/types.rb', line 3845

def info
  @info
end

#metadataObject (readonly)

Returns the value of attribute metadata.



3845
3846
3847
# File 'lib/cadenya/types.rb', line 3845

def 
  @metadata
end

Class Method Details

.from_json(data) ⇒ Object



3853
3854
3855
3856
3857
3858
3859
# File 'lib/cadenya/types.rb', line 3853

def self.from_json(data)
  new(
    metadata: data["metadata"].nil? ? nil : Types::OperationMetadata.from_json(data["metadata"]),
    data: data["data"].nil? ? nil : Types::ObjectiveFeedbackData.from_json(data["data"]),
    info: data["info"].nil? ? nil : Types::ObjectiveFeedbackInfo.from_json(data["info"]),
  )
end

Instance Method Details

#to_hObject



3861
3862
3863
3864
3865
3866
3867
# File 'lib/cadenya/types.rb', line 3861

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