lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb in google-cloud-dialogflow-0.2.3 vs lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb in google-cloud-dialogflow-0.3.0

- old
+ new

@@ -1,6 +1,6 @@ -# Copyright 2018 Google LLC +# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # @@ -20,24 +20,27 @@ # Represents an intent. # Intents convert a number of user expressions or patterns into an action. An # action is an extraction of a user command or sentence semantics. # @!attribute [rw] name # @return [String] - # Required for all methods except `create` (`create` populates the name - # automatically. # The unique identifier of this intent. + # Required for {Google::Cloud::Dialogflow::V2::Intents::UpdateIntent Intents::UpdateIntent} and {Google::Cloud::Dialogflow::V2::Intents::BatchUpdateIntents Intents::BatchUpdateIntents} + # methods. # Format: `projects/<Project ID>/agent/intents/<Intent ID>`. # @!attribute [rw] display_name # @return [String] # Required. The name of this intent. # @!attribute [rw] webhook_state # @return [Google::Cloud::Dialogflow::V2::Intent::WebhookState] - # Required. Indicates whether webhooks are enabled for the intent. + # Optional. Indicates whether webhooks are enabled for the intent. # @!attribute [rw] priority # @return [Integer] # Optional. The priority of this intent. Higher numbers represent higher - # priorities. Zero or negative numbers mean that the intent is disabled. + # priorities. If this is zero or unspecified, we use the default + # priority 500000. + # + # Negative numbers mean that the intent is disabled. # @!attribute [rw] is_fallback # @return [true, false] # Optional. Indicates whether this is a fallback intent. # @!attribute [rw] ml_disabled # @return [true, false] @@ -55,15 +58,16 @@ # Optional. The collection of event names that trigger the intent. # If the collection of input contexts is not empty, all of the contexts must # be present in the active user session for an event to trigger this intent. # @!attribute [rw] training_phrases # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase>] - # Optional. The collection of examples/templates that the agent is + # Optional. The collection of examples that the agent is # trained on. # @!attribute [rw] action # @return [String] # Optional. The name of the action associated with the intent. + # Note: The action name must not contain whitespaces. # @!attribute [rw] output_contexts # @return [Array<Google::Cloud::Dialogflow::V2::Context>] # Optional. The collection of contexts that are activated when the intent # is matched. Context messages in this collection should not set the # parameters field. Setting the `lifespan_count` to 0 will reset the context @@ -84,61 +88,82 @@ # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Platform>] # Optional. The list of platforms for which the first response will be # taken from among the messages assigned to the DEFAULT_PLATFORM. # @!attribute [rw] root_followup_intent_name # @return [String] - # The unique identifier of the root intent in the chain of followup intents. - # It identifies the correct followup intents chain for this intent. + # Read-only. The unique identifier of the root intent in the chain of + # followup intents. It identifies the correct followup intents chain for + # this intent. We populate this field only in the output. + # # Format: `projects/<Project ID>/agent/intents/<Intent ID>`. # @!attribute [rw] parent_followup_intent_name # @return [String] - # The unique identifier of the parent intent in the chain of followup - # intents. + # Read-only after creation. The unique identifier of the parent intent in the + # chain of followup intents. You can set this field when creating an intent, + # for example with {CreateIntent} or {BatchUpdateIntents}, in order to + # make this intent a followup intent. + # # It identifies the parent followup intent. # Format: `projects/<Project ID>/agent/intents/<Intent ID>`. # @!attribute [rw] followup_intent_info # @return [Array<Google::Cloud::Dialogflow::V2::Intent::FollowupIntentInfo>] - # Optional. Collection of information about all followup intents that have - # name of this intent as a root_name. + # Read-only. Information about all followup intents that have this intent as + # a direct or indirect parent. We populate this field only in the output. class Intent - # Represents an example or template that the agent is trained on. + # Represents an example that the agent is trained on. # @!attribute [rw] name # @return [String] - # Required. The unique identifier of this training phrase. + # Output only. The unique identifier of this training phrase. # @!attribute [rw] type # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type] # Required. The type of the training phrase. # @!attribute [rw] parts # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>] - # Required. The collection of training phrase parts (can be annotated). - # Fields: `entity_type`, `alias` and `user_defined` should be populated - # only for the annotated parts of the training phrase. + # Required. The ordered list of training phrase parts. + # The parts are concatenated in order to form the training phrase. + # + # Note: The API does not automatically annotate training phrases like the + # Dialogflow Console does. + # + # Note: Do not forget to include whitespace at part boundaries, + # so the training phrase is well formatted when the parts are concatenated. + # + # If the training phrase does not need to be annotated with parameters, + # you just need a single part with only the {Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part#text Part#text} field set. + # + # If you want to annotate the training phrase, you must create multiple + # parts, where the fields of each part are populated in one of two ways: + # + # * `Part.text` is set to a part of the phrase that has no parameters. + # * `Part.text` is set to a part of the phrase that you want to annotate, + # and the `entity_type`, `alias`, and `user_defined` fields are all + # set. # @!attribute [rw] times_added_count # @return [Integer] - # Optional. Indicates how many times this example or template was added to + # Optional. Indicates how many times this example was added to # the intent. Each time a developer adds an existing sample by editing an # intent or training, this counter is increased. class TrainingPhrase # Represents a part of a training phrase. # @!attribute [rw] text # @return [String] - # Required. The text corresponding to the example or template, - # if there are no annotations. For - # annotated examples, it is the text for one of the example's parts. + # Required. The text for this part. # @!attribute [rw] entity_type # @return [String] - # Optional. The entity type name prefixed with `@`. This field is - # required for the annotated part of the text and applies only to - # examples. + # Optional. The entity type name prefixed with `@`. + # This field is required for annotated parts of the training phrase. # @!attribute [rw] alias # @return [String] # 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. # @!attribute [rw] user_defined # @return [true, false] - # Optional. Indicates whether the text was manually annotated by the - # developer. + # 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. class Part; end # Represents different types of training phrases. module Type # Not specified. This value should never be used. @@ -148,10 +173,14 @@ # can be annotated with entity types. EXAMPLE = 1 # Templates are not annotated with entity types, but they can contain # @-prefixed entity type names as substrings. + # Template mode has been deprecated. Example mode is the only supported + # way to create new training phrases. If you have existing training + # phrases that you've created in template mode, those will continue to + # work. TEMPLATE = 2 end end # Represents intent parameters. @@ -518,11 +547,11 @@ # @return [String] # The unique identifier of the followup intent. # Format: `projects/<Project ID>/agent/intents/<Intent ID>`. # @!attribute [rw] parent_followup_intent_name # @return [String] - # The unique identifier of the followup intent parent. + # The unique identifier of the followup intent's parent. # Format: `projects/<Project ID>/agent/intents/<Intent ID>`. class FollowupIntentInfo; end # Represents the different states that webhooks can be in. module WebhookState @@ -545,13 +574,14 @@ # Format: `projects/<Project ID>/agent`. # @!attribute [rw] language_code # @return [String] # Optional. The language to list training phrases, parameters and rich # messages for. If not specified, the agent's default language is used. - # [More than a dozen - # languages](https://dialogflow.com/docs/reference/language) are supported. - # Note: languages must be enabled in the agent before they can be used. + # [Many + # languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) + # are supported. Note: languages must be enabled in the agent before they can + # be used. # @!attribute [rw] intent_view # @return [Google::Cloud::Dialogflow::V2::IntentView] # Optional. The resource view to apply to the returned intent. # @!attribute [rw] page_size # @return [Integer] @@ -580,13 +610,14 @@ # Format: `projects/<Project ID>/agent/intents/<Intent ID>`. # @!attribute [rw] language_code # @return [String] # Optional. The language to retrieve training phrases, parameters and rich # messages for. If not specified, the agent's default language is used. - # [More than a dozen - # languages](https://dialogflow.com/docs/reference/language) are supported. - # Note: languages must be enabled in the agent, before they can be used. + # [Many + # languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) + # are supported. Note: languages must be enabled in the agent before they can + # be used. # @!attribute [rw] intent_view # @return [Google::Cloud::Dialogflow::V2::IntentView] # Optional. The resource view to apply to the returned intent. class GetIntentRequest; end @@ -600,30 +631,31 @@ # Required. The intent to create. # @!attribute [rw] language_code # @return [String] # Optional. The language of training phrases, parameters and rich messages # defined in `intent`. If not specified, the agent's default language is - # used. [More than a dozen - # languages](https://dialogflow.com/docs/reference/language) are supported. - # Note: languages must be enabled in the agent, before they can be used. + # used. [Many + # languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) + # are supported. Note: languages must be enabled in the agent before they can + # be used. # @!attribute [rw] intent_view # @return [Google::Cloud::Dialogflow::V2::IntentView] # Optional. The resource view to apply to the returned intent. class CreateIntentRequest; end # The request message for {Google::Cloud::Dialogflow::V2::Intents::UpdateIntent Intents::UpdateIntent}. # @!attribute [rw] intent # @return [Google::Cloud::Dialogflow::V2::Intent] # Required. The intent to update. - # Format: `projects/<Project ID>/agent/intents/<Intent ID>`. # @!attribute [rw] language_code # @return [String] # Optional. The language of training phrases, parameters and rich messages # defined in `intent`. If not specified, the agent's default language is - # used. [More than a dozen - # languages](https://dialogflow.com/docs/reference/language) are supported. - # Note: languages must be enabled in the agent, before they can be used. + # used. [Many + # languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) + # are supported. Note: languages must be enabled in the agent before they can + # be used. # @!attribute [rw] update_mask # @return [Google::Protobuf::FieldMask] # Optional. The mask to control which fields get updated. # @!attribute [rw] intent_view # @return [Google::Cloud::Dialogflow::V2::IntentView] @@ -631,11 +663,12 @@ class UpdateIntentRequest; end # The request message for {Google::Cloud::Dialogflow::V2::Intents::DeleteIntent Intents::DeleteIntent}. # @!attribute [rw] name # @return [String] - # Required. The name of the intent to delete. + # Required. The name of the intent to delete. If this intent has direct or + # indirect followup intents, we also delete them. # Format: `projects/<Project ID>/agent/intents/<Intent ID>`. class DeleteIntentRequest; end # The request message for {Google::Cloud::Dialogflow::V2::Intents::BatchUpdateIntents Intents::BatchUpdateIntents}. # @!attribute [rw] parent @@ -652,12 +685,13 @@ # The collection of intents to update or create. # @!attribute [rw] language_code # @return [String] # Optional. The language of training phrases, parameters and rich messages # defined in `intents`. If not specified, the agent's default language is - # used. [More than a dozen - # languages](https://dialogflow.com/docs/reference/language) are supported. - # Note: languages must be enabled in the agent, before they can be used. + # used. [Many + # languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) + # are supported. Note: languages must be enabled in the agent before they can + # be used. # @!attribute [rw] update_mask # @return [Google::Protobuf::FieldMask] # Optional. The mask to control which fields get updated. # @!attribute [rw] intent_view # @return [Google::Cloud::Dialogflow::V2::IntentView] \ No newline at end of file