Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1ConversationEvent

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 notification sent to Pub/Sub subscribers for conversation lifecycle events.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2beta1ConversationEvent

Returns a new instance of GoogleCloudDialogflowV2beta1ConversationEvent.



20257
20258
20259
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 20257

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

Instance Attribute Details

#conversationString

Required. The unique identifier of the conversation this notification refers to. Format: projects//conversations/. Corresponds to the JSON property conversation

Returns:

  • (String)


20208
20209
20210
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 20208

def conversation
  @conversation
end

#error_statusGoogle::Apis::DialogflowV2::GoogleRpcStatus

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide. Corresponds to the JSON property errorStatus



20218
20219
20220
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 20218

def error_status
  @error_status
end

#new_message_payloadGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1Message

Represents a message posted into a conversation. Corresponds to the JSON property newMessagePayload



20223
20224
20225
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 20223

def new_message_payload
  @new_message_payload
end

#new_recognition_result_payloadGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2beta1StreamingRecognitionResult

Contains a speech recognition result corresponding to a portion of the audio that is currently being processed or an indication that this is the end of the single requested utterance. While end-user audio is being processed, Dialogflow sends a series of results. Each result may contain a transcript value. A transcript represents a portion of the utterance. While the recognizer is processing audio, transcript values may be interim values or finalized values. Once a transcript is finalized, the is_final value is set to true and processing continues for the next transcript. If StreamingDetectIntentRequest.query_input.audio_config.single_utterance was true, and the recognizer has completed processing audio, the message_type value is set to END_OF_SINGLE_UTTERANCE and the following (last) result contains the last finalized transcript. The complete end-user utterance is determined by concatenating the finalized transcript values received for the series of results. In the following example, single utterance is enabled. In the case where single utterance is not enabled, result 7 would not occur. Num | transcript | message_type | is_final --- | ----------------------- | ---- ------------------- | -------- 1 | "tube" | TRANSCRIPT | false 2 | "to be a" | TRANSCRIPT | false 3 | "to be" | TRANSCRIPT | false 4 | "to be or not to be" | TRANSCRIPT | true 5 | "that's" | TRANSCRIPT | false 6 | "that is | TRANSCRIPT | false 7 | unset | END_OF_SINGLE_UTTERANCE | unset 8 | " that is the question" | TRANSCRIPT | trueConcatenating the finalized transcripts withis_final set to true, the complete utterance becomes "to be or not to be that is the question". Corresponds to the JSON propertynewRecognitionResultPayload`



20250
20251
20252
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 20250

def new_recognition_result_payload
  @new_recognition_result_payload
end

#typeString

Required. The type of the event that this notification refers to. Corresponds to the JSON property type

Returns:

  • (String)


20255
20256
20257
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 20255

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



20262
20263
20264
20265
20266
20267
20268
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 20262

def update!(**args)
  @conversation = args[:conversation] if args.key?(:conversation)
  @error_status = args[:error_status] if args.key?(:error_status)
  @new_message_payload = args[:new_message_payload] if args.key?(:new_message_payload)
  @new_recognition_result_payload = args[:new_recognition_result_payload] if args.key?(:new_recognition_result_payload)
  @type = args[:type] if args.key?(:type)
end