Class: Telnyx::Models::CallAIGatherMessageHistoryUpdatedWebhookEvent::Data::Payload::MessageHistory

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/telnyx/models/call_ai_gather_message_history_updated_webhook_event.rb

Defined Under Namespace

Modules: Role

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(content: nil, role: nil) ⇒ Object

Parameters:



143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/telnyx/models/call_ai_gather_message_history_updated_webhook_event.rb', line 143

class MessageHistory < Telnyx::Internal::Type::BaseModel
  # @!attribute content
  #   The content of the message
  #
  #   @return [String, nil]
  optional :content, String

  # @!attribute role
  #   The role of the message sender
  #
  #   @return [Symbol, Telnyx::Models::CallAIGatherMessageHistoryUpdatedWebhookEvent::Data::Payload::MessageHistory::Role, nil]
  optional :role,
           enum: -> { Telnyx::CallAIGatherMessageHistoryUpdatedWebhookEvent::Data::Payload::MessageHistory::Role }

  # @!method initialize(content: nil, role: nil)
  #   @param content [String] The content of the message
  #
  #   @param role [Symbol, Telnyx::Models::CallAIGatherMessageHistoryUpdatedWebhookEvent::Data::Payload::MessageHistory::Role] The role of the message sender

  # The role of the message sender
  #
  # @see Telnyx::Models::CallAIGatherMessageHistoryUpdatedWebhookEvent::Data::Payload::MessageHistory#role
  module Role
    extend Telnyx::Internal::Type::Enum

    ASSISTANT = :assistant
    USER = :user

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#contentString?

The content of the message

Returns:

  • (String, nil)


148
# File 'lib/telnyx/models/call_ai_gather_message_history_updated_webhook_event.rb', line 148

optional :content, String

#roleSymbol, ...

The role of the message sender



154
155
# File 'lib/telnyx/models/call_ai_gather_message_history_updated_webhook_event.rb', line 154

optional :role,
enum: -> { Telnyx::CallAIGatherMessageHistoryUpdatedWebhookEvent::Data::Payload::MessageHistory::Role }