Class: Cadenya::Types::ObjectiveContextWindowInfo

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(objective: nil, created_by: nil) ⇒ ObjectiveContextWindowInfo

Returns a new instance of ObjectiveContextWindowInfo.



3650
3651
3652
3653
# File 'lib/cadenya/types.rb', line 3650

def initialize(objective: nil, created_by: nil)
  @objective = objective
  @created_by = created_by
end

Instance Attribute Details

#created_byObject (readonly)

Returns the value of attribute created_by.



3648
3649
3650
# File 'lib/cadenya/types.rb', line 3648

def created_by
  @created_by
end

#objectiveObject (readonly)

Returns the value of attribute objective.



3648
3649
3650
# File 'lib/cadenya/types.rb', line 3648

def objective
  @objective
end

Class Method Details

.from_json(data) ⇒ Object



3655
3656
3657
3658
3659
3660
# File 'lib/cadenya/types.rb', line 3655

def self.from_json(data)
  new(
    objective: data["objective"].nil? ? nil : Types::OperationMetadata.from_json(data["objective"]),
    created_by: data["createdBy"].nil? ? nil : Types::Profile.from_json(data["createdBy"]),
  )
end

Instance Method Details

#to_hObject



3662
3663
3664
3665
3666
3667
# File 'lib/cadenya/types.rb', line 3662

def to_h
  {
    objective: Util.plain(@objective),
    created_by: Util.plain(@created_by),
  }.reject { |_k, v| v.nil? }
end