Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Message

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v2/classes.rb,
lib/google/apis/dialogflow_v2/representations.rb,
lib/google/apis/dialogflow_v2/representations.rb

Overview

Represents a message posted into a conversation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2Message

Returns a new instance of GoogleCloudDialogflowV2Message.



15683
15684
15685
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 15683

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#contentString

Required. The message content. Corresponds to the JSON property content

Returns:

  • (String)


15632
15633
15634
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 15632

def content
  @content
end

#create_timeString

Output only. The time when the message was created in Contact Center AI. Corresponds to the JSON property createTime

Returns:

  • (String)


15637
15638
15639
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 15637

def create_time
  @create_time
end

#language_codeString

Optional. The message language. This should be a BCP-47 language tag. Example: "en-US". Corresponds to the JSON property languageCode

Returns:

  • (String)


15643
15644
15645
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 15643

def language_code
  @language_code
end

#message_annotationGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2MessageAnnotation

Represents the result of annotation for the message. Corresponds to the JSON property messageAnnotation



15648
15649
15650
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 15648

def message_annotation
  @message_annotation
end

#nameString

Optional. The unique identifier of the message. Format: projects//locations// conversations//messages/. Corresponds to the JSON property name

Returns:

  • (String)


15654
15655
15656
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 15654

def name
  @name
end

#participantString

Output only. The participant that sends this message. Corresponds to the JSON property participant

Returns:

  • (String)


15659
15660
15661
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 15659

def participant
  @participant
end

#participant_roleString

Output only. The role of the participant. Corresponds to the JSON property participantRole

Returns:

  • (String)


15664
15665
15666
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 15664

def participant_role
  @participant_role
end

#send_timeString

Optional. The time when the message was sent. For voice messages, this is the time when an utterance started. Corresponds to the JSON property sendTime

Returns:

  • (String)


15670
15671
15672
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 15670

def send_time
  @send_time
end

#sentiment_analysisGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2SentimentAnalysisResult

The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user's attitude as positive, negative, or neutral. For DetectIntent, it needs to be configured in DetectIntentRequest.query_params. For StreamingDetectIntent, it needs to be configured in StreamingDetectIntentRequest.query_params. And for Participants.AnalyzeContent and Participants.StreamingAnalyzeContent, it needs to be configured in ConversationProfile.human_agent_assistant_config Corresponds to the JSON property sentimentAnalysis



15681
15682
15683
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 15681

def sentiment_analysis
  @sentiment_analysis
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 15688

def update!(**args)
  @content = args[:content] if args.key?(:content)
  @create_time = args[:create_time] if args.key?(:create_time)
  @language_code = args[:language_code] if args.key?(:language_code)
  @message_annotation = args[:message_annotation] if args.key?(:message_annotation)
  @name = args[:name] if args.key?(:name)
  @participant = args[:participant] if args.key?(:participant)
  @participant_role = args[:participant_role] if args.key?(:participant_role)
  @send_time = args[:send_time] if args.key?(:send_time)
  @sentiment_analysis = args[:sentiment_analysis] if args.key?(:sentiment_analysis)
end