Service Client: Google::Cloud::Dialogflow::V2::Intent::IntentsClient
Client stub representing the remote Intents gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to dialogflow.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Dialogflow::V2::Intent - Compiled Protocol Buffers messages for google/cloud/dialogflow/v2/intent.proto
SYNOPSIS
use Google::Cloud::Dialogflow::V2::Intent;
my $msg = Google::Cloud::Dialogflow::V2::Intent::Intent->new({
name => $name,
display_name => $display_name,
webhook_state => $webhook_state,
priority => $priority,
});
# Read or update a field
my $val = $msg->name();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Dialogflow::V2::Intent::Intent->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/dialogflow/v2/intent.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Dialogflow::V2::Intent::Intent
An intent categorizes an end-user's intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification.
For more information, see the [intent guide](https://cloud.google.com/dialogflow/docs/intents-overview).
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringOptional. The unique identifier of this intent. Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents] methods. Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
$msg->display_name()/$msg->display_name($value)Type:
StringRequired. The name of this intent.
$msg->webhook_state()/$msg->webhook_state($value)Type:
Enum(Google::Cloud::Dialogflow::V2::Intent::WebhookState)Optional. Indicates whether webhooks are enabled for the intent.
$msg->priority()/$msg->priority($value)Type:
Int32Optional. The priority of this intent. Higher numbers represent higher priorities.
- If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the `Normal` priority in the console. - If the supplied value is negative, the intent is ignored in runtime detect intent requests.
$msg->is_fallback()/$msg->is_fallback($value)Type:
BoolOptional. Indicates whether this is a fallback intent.
$msg->ml_disabled()/$msg->ml_disabled($value)Type:
BoolOptional. Indicates whether Machine Learning is disabled for the intent. Note: If `ml_disabled` setting is set to true, then this intent is not taken into account during inference in `ML ONLY` match mode. Also, auto-markup in the UI is turned off.
$msg->live_agent_handoff()/$msg->live_agent_handoff($value)Type:
BoolOptional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.
$msg->end_interaction()/$msg->end_interaction($value)Type:
BoolOptional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false.
$msg->input_context_names()/$msg->input_context_names($value)Type:
StringOptional. The list of context names required for this intent to be triggered. Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
$msg->events()/$msg->events($value)Type:
StringOptional. 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. Event names are limited to 150 characters.
$msg->training_phrases()/$msg->training_phrases($value)Type:
Message(Google::Cloud::Dialogflow::V2::Intent::Intent::TrainingPhrase)Optional. The collection of examples that the agent is trained on.
$msg->action()/$msg->action($value)Type:
StringOptional. The name of the action associated with the intent. Note: The action name must not contain whitespaces.
$msg->output_contexts()/$msg->output_contexts($value)Type:
Message(Google::Cloud::Dialogflow::V2::Context::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 when the intent is matched. Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
$msg->reset_contexts()/$msg->reset_contexts($value)Type:
BoolOptional. Indicates whether to delete all contexts in the current session when this intent is matched.
$msg->parameters()/$msg->parameters($value)Type:
Message(Google::Cloud::Dialogflow::V2::Intent::Intent::Parameter)Optional. The collection of parameters associated with the intent.
$msg->messages()/$msg->messages($value)Type:
Message(Google::Cloud::Dialogflow::V2::Intent::Intent::Message)Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console.
$msg->default_response_platforms()/$msg->default_response_platforms($value)Type:
Enum(Google::Cloud::Dialogflow::V2::Intent::Message::Platform)Optional. The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform).
$msg->root_followup_intent_name()/$msg->root_followup_intent_name($value)Type:
StringOutput only. 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>`.
$msg->parent_followup_intent_name()/$msg->parent_followup_intent_name($value)Type:
StringRead-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][google.cloud.dialogflow.v2.Intents.CreateIntent] or [BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents], in order to make this intent a followup intent.
It identifies the parent followup intent. Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
$msg->followup_intent_info()/$msg->followup_intent_info($value)Type:
Message(Google::Cloud::Dialogflow::V2::Intent::Intent::FollowupIntentInfo)Output only. 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.
Enum: Intent::WebhookState
WEBHOOK_STATE_UNSPECIFIED=>0WEBHOOK_STATE_ENABLED=>1WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING=>2
Google::Cloud::Dialogflow::V2::Intent::ListIntentsRequest
The request message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents].
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The agent to list all intents from. Format: `projects/<Project ID>/agent` or `projects/<Project ID>/locations/<Location ID>/agent`.
Alternatively, you can specify the environment to list intents for. Format: `projects/<Project ID>/agent/environments/<Environment ID>` or `projects/<Project ID>/locations/<Location ID>/agent/environments/<Environment ID>`. Note: training phrases of the intents will not be returned for non-draft environment.
$msg->language_code()/$msg->language_code($value)Type:
StringOptional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
$msg->intent_view()/$msg->intent_view($value)Type:
Enum(Google::Cloud::Dialogflow::V2::IntentView)Optional. The resource view to apply to the returned intent.
$msg->page_size()/$msg->page_size($value)Type:
Int32Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
$msg->page_token()/$msg->page_token($value)Type:
StringOptional. The next_page_token value returned from a previous list request.
Google::Cloud::Dialogflow::V2::Intent::ListIntentsResponse
The response message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents].
Inherits from Protobuf::Message.
Accessors
$msg->intents()/$msg->intents($value)Type:
Message(Google::Cloud::Dialogflow::V2::Intent::Intent)The list of agent intents. There will be a maximum number of items returned based on the page_size field in the request.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringToken to retrieve the next page of results, or empty if there are no more results in the list.
Google::Cloud::Dialogflow::V2::Intent::GetIntentRequest
The request message for [Intents.GetIntent][google.cloud.dialogflow.v2.Intents.GetIntent].
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the intent. Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
$msg->language_code()/$msg->language_code($value)Type:
StringOptional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
$msg->intent_view()/$msg->intent_view($value)Type:
Enum(Google::Cloud::Dialogflow::V2::IntentView)Optional. The resource view to apply to the returned intent.
Google::Cloud::Dialogflow::V2::Intent::CreateIntentRequest
The request message for [Intents.CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent].
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The agent to create a intent for. Format: `projects/<Project ID>/agent`.
$msg->intent()/$msg->intent($value)Type:
Message(Google::Cloud::Dialogflow::V2::Intent::Intent)Required. The intent to create.
$msg->language_code()/$msg->language_code($value)Type:
StringOptional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
$msg->intent_view()/$msg->intent_view($value)Type:
Enum(Google::Cloud::Dialogflow::V2::IntentView)Optional. The resource view to apply to the returned intent.
Google::Cloud::Dialogflow::V2::Intent::UpdateIntentRequest
The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent].
Inherits from Protobuf::Message.
Accessors
$msg->intent()/$msg->intent($value)Type:
Message(Google::Cloud::Dialogflow::V2::Intent::Intent)Required. The intent to update.
$msg->language_code()/$msg->language_code($value)Type:
StringOptional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
$msg->update_mask()/$msg->update_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)Optional. The mask to control which fields get updated.
$msg->intent_view()/$msg->intent_view($value)Type:
Enum(Google::Cloud::Dialogflow::V2::IntentView)Optional. The resource view to apply to the returned intent.
Google::Cloud::Dialogflow::V2::Intent::DeleteIntentRequest
The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2.Intents.DeleteIntent].
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. 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>`.
Google::Cloud::Dialogflow::V2::Intent::BatchUpdateIntentsRequest
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The name of the agent to update or create intents in. Format: `projects/<Project ID>/agent`.
$msg->intent_batch_uri()/$msg->intent_batch_uri($value)Type:
StringThe URI to a Google Cloud Storage file containing intents to update or create. The file format can either be a serialized proto (of IntentBatch type) or JSON object. Note: The URI must start with "gs://".
$msg->intent_batch_inline()/$msg->intent_batch_inline($value)Type:
Message(Google::Cloud::Dialogflow::V2::Intent::IntentBatch)The collection of intents to update or create.
$msg->language_code()/$msg->language_code($value)Type:
StringOptional. The language used to access language-specific data. If not specified, the agent's default language is used. For more information, see [Multilingual intent and entity data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
$msg->update_mask()/$msg->update_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)Optional. The mask to control which fields get updated.
$msg->intent_view()/$msg->intent_view($value)Type:
Enum(Google::Cloud::Dialogflow::V2::IntentView)Optional. The resource view to apply to the returned intent.
Google::Cloud::Dialogflow::V2::Intent::BatchUpdateIntentsResponse
The response message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents].
Inherits from Protobuf::Message.
Accessors
$msg->intents()/$msg->intents($value)Type:
Message(Google::Cloud::Dialogflow::V2::Intent::Intent)The collection of updated or created intents.
Google::Cloud::Dialogflow::V2::Intent::BatchDeleteIntentsRequest
The request message for [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2.Intents.BatchDeleteIntents].
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The name of the agent to delete all entities types for. Format: `projects/<Project ID>/agent`.
$msg->intents()/$msg->intents($value)Type:
Message(Google::Cloud::Dialogflow::V2::Intent::Intent)Required. The collection of intents to delete. Only intent `name` must be filled in.
Google::Cloud::Dialogflow::V2::Intent::IntentBatch
This message is a wrapper around a collection of intents.
Inherits from Protobuf::Message.
Accessors
$msg->intents()/$msg->intents($value)Type:
Message(Google::Cloud::Dialogflow::V2::Intent::Intent)A collection of intents.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Dialogflow::V2::Intent::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.