Class: Google::Cloud::Dialogflow::CX::V3::Form

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/dialogflow/cx/v3/page.rb

Overview

A form is a data model that groups related parameters that can be collected from the user. The process in which the agent prompts the user and collects parameter values from the user is called form filling. A form can be added to a page. When form filling is done, the filled parameters will be written to the session.

Defined Under Namespace

Classes: Parameter

Instance Attribute Summary collapse

Instance Attribute Details

#parameters::Array<::Google::Cloud::Dialogflow::CX::V3::Form::Parameter>

Returns Parameters to collect from the user.

Returns:



132
133
134
135
136
137
138
139
140
141
142
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'proto_docs/google/cloud/dialogflow/cx/v3/page.rb', line 132

class Form
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Represents a form parameter.
  # @!attribute [rw] display_name
  #   @return [::String]
  #     Required. The human-readable name of the parameter, unique within the
  #     form.
  # @!attribute [rw] required
  #   @return [::Boolean]
  #     Indicates whether the parameter is required. Optional parameters will not
  #     trigger prompts; however, they are filled if the user specifies them.
  #     Required parameters must be filled before form filling concludes.
  # @!attribute [rw] entity_type
  #   @return [::String]
  #     Required. The entity type of the parameter.
  #     Format:
  #     `projects/-/locations/-/agents/-/entityTypes/<SystemEntityTypeID>` for
  #     system entity types (for example,
  #     `projects/-/locations/-/agents/-/entityTypes/sys.date`), or
  #     `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/entityTypes/<EntityTypeID>`
  #     for developer entity types.
  # @!attribute [rw] is_list
  #   @return [::Boolean]
  #     Indicates whether the parameter represents a list of values.
  # @!attribute [rw] fill_behavior
  #   @return [::Google::Cloud::Dialogflow::CX::V3::Form::Parameter::FillBehavior]
  #     Required. Defines fill behavior for the parameter.
  # @!attribute [rw] default_value
  #   @return [::Google::Protobuf::Value]
  #     The default value of an optional parameter. If the parameter is required,
  #     the default value will be ignored.
  # @!attribute [rw] redact
  #   @return [::Boolean]
  #     Indicates whether the parameter content should be redacted in log.  If
  #     redaction is enabled, the parameter content will be replaced by parameter
  #     name during logging.
  #     Note: the parameter content is subject to redaction if either parameter
  #     level redaction or [entity type level
  #     redaction][google.cloud.dialogflow.cx.v3.EntityType.redact] is enabled.
  # @!attribute [rw] advanced_settings
  #   @return [::Google::Cloud::Dialogflow::CX::V3::AdvancedSettings]
  #     Hierarchical advanced settings for this parameter. The settings exposed
  #     at the lower level overrides the settings exposed at the higher level.
  class Parameter
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Configuration for how the filling of a parameter should be handled.
    # @!attribute [rw] initial_prompt_fulfillment
    #   @return [::Google::Cloud::Dialogflow::CX::V3::Fulfillment]
    #     Required. The fulfillment to provide the initial prompt that the agent
    #     can present to the user in order to fill the parameter.
    # @!attribute [rw] reprompt_event_handlers
    #   @return [::Array<::Google::Cloud::Dialogflow::CX::V3::EventHandler>]
    #     The handlers for parameter-level events, used to provide reprompt for
    #     the parameter or transition to a different page/flow. The supported
    #     events are:
    #     *   `sys.no-match-<N>`, where N can be from 1 to 6
    #     *   `sys.no-match-default`
    #     *   `sys.no-input-<N>`, where N can be from 1 to 6
    #     *   `sys.no-input-default`
    #     *   `sys.invalid-parameter`
    #
    #     `initial_prompt_fulfillment` provides the first prompt for the
    #     parameter.
    #
    #     If the user's response does not fill the parameter, a
    #     no-match/no-input event will be triggered, and the fulfillment
    #     associated with the `sys.no-match-1`/`sys.no-input-1` handler (if
    #     defined) will be called to provide a prompt. The
    #     `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond to
    #     the next no-match/no-input event, and so on.
    #
    #     A `sys.no-match-default` or `sys.no-input-default` handler will be used
    #     to handle all following no-match/no-input events after all numbered
    #     no-match/no-input handlers for the parameter are consumed.
    #
    #     A `sys.invalid-parameter` handler can be defined to handle the case
    #     where the parameter values have been `invalidated` by webhook. For
    #     example, if the user's response fill the parameter, however the
    #     parameter was invalidated by webhook, the fulfillment associated with
    #     the `sys.invalid-parameter` handler (if defined) will be called to
    #     provide a prompt.
    #
    #     If the event handler for the corresponding event can't be found on the
    #     parameter, `initial_prompt_fulfillment` will be re-prompted.
    class FillBehavior
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end
end