Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2IntentTrainingPhrasePart

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 part of a training phrase.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2IntentTrainingPhrasePart

Returns a new instance of GoogleCloudDialogflowV2IntentTrainingPhrasePart.



10238
10239
10240
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10238

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

Instance Attribute Details

#aliasString

Optional. The parameter name for the value extracted from the annotated part of the example. This field is required for annotated parts of the training phrase. Corresponds to the JSON property alias

Returns:

  • (String)


10217
10218
10219
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10217

def alias
  @alias
end

#entity_typeString

Optional. The entity type name prefixed with @. This field is required for annotated parts of the training phrase. Corresponds to the JSON property entityType

Returns:

  • (String)


10223
10224
10225
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10223

def entity_type
  @entity_type
end

#textString

Required. The text for this part. Corresponds to the JSON property text

Returns:

  • (String)


10228
10229
10230
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10228

def text
  @text
end

#user_definedBoolean Also known as: user_defined?

Optional. Indicates whether the text was manually annotated. This field is set to true when the Dialogflow Console is used to manually annotate the part. When creating an annotated part with the API, you must set this to true. Corresponds to the JSON property userDefined

Returns:

  • (Boolean)


10235
10236
10237
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10235

def user_defined
  @user_defined
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10243
10244
10245
10246
10247
10248
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 10243

def update!(**args)
  @alias = args[:alias] if args.key?(:alias)
  @entity_type = args[:entity_type] if args.key?(:entity_type)
  @text = args[:text] if args.key?(:text)
  @user_defined = args[:user_defined] if args.key?(:user_defined)
end