Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2IntentParameter

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

Overview

Represents intent parameters.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2IntentParameter

Returns a new instance of GoogleCloudDialogflowV2IntentParameter



1662
1663
1664
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 1662

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

Instance Attribute Details

#default_valueString

Optional. The default value to use when the value yields an empty result. Default values can be extracted from contexts by using the following syntax: #context_name.parameter_name. Corresponds to the JSON property defaultValue

Returns:

  • (String)


1613
1614
1615
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 1613

def default_value
  @default_value
end

#display_nameString

Required. The name of the parameter. Corresponds to the JSON property displayName

Returns:

  • (String)


1618
1619
1620
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 1618

def display_name
  @display_name
end

#entity_type_display_nameString

Optional. The name of the entity type, prefixed with @, that describes values of the parameter. If the parameter is required, this must be provided. Corresponds to the JSON property entityTypeDisplayName

Returns:

  • (String)


1625
1626
1627
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 1625

def entity_type_display_name
  @entity_type_display_name
end

#is_listBoolean Also known as: is_list?

Optional. Indicates whether the parameter represents a list of values. Corresponds to the JSON property isList

Returns:

  • (Boolean)


1630
1631
1632
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 1630

def is_list
  @is_list
end

#mandatoryBoolean Also known as: mandatory?

Optional. Indicates whether the parameter is required. That is, whether the intent cannot be completed without collecting the parameter value. Corresponds to the JSON property mandatory

Returns:

  • (Boolean)


1638
1639
1640
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 1638

def mandatory
  @mandatory
end

#nameString

The unique identifier of this parameter. Corresponds to the JSON property name

Returns:

  • (String)


1644
1645
1646
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 1644

def name
  @name
end

#promptsArray<String>

Optional. The collection of prompts that the agent can present to the user in order to collect value for the parameter. Corresponds to the JSON property prompts

Returns:

  • (Array<String>)


1650
1651
1652
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 1650

def prompts
  @prompts
end

#valueString

Optional. The definition of the parameter value. It can be:

  • a constant string,
  • a parameter value defined as $parameter_name,
  • an original parameter value defined as $parameter_name.original,
  • a parameter value from some context defined as #context_name.parameter_name. Corresponds to the JSON property value

Returns:

  • (String)


1660
1661
1662
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 1660

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 1667

def update!(**args)
  @default_value = args[:default_value] if args.key?(:default_value)
  @display_name = args[:display_name] if args.key?(:display_name)
  @entity_type_display_name = args[:entity_type_display_name] if args.key?(:entity_type_display_name)
  @is_list = args[:is_list] if args.key?(:is_list)
  @mandatory = args[:mandatory] if args.key?(:mandatory)
  @name = args[:name] if args.key?(:name)
  @prompts = args[:prompts] if args.key?(:prompts)
  @value = args[:value] if args.key?(:value)
end