NAME
Google::Cloud::Dialogflow::V2 - Client library for Google Cloud Services
SYNOPSIS
use Google::Cloud::Dialogflow::V2;
use Google::Auth;
my $auth = Google::Auth->default();
# 1. High-performance gRPC Transport (Default)
my $grpc_client = Google::Cloud::Dialogflow::V2->new(
credentials => $auth,
transport => 'grpc', # Optional: 'grpc' is default
);
# 2. HTTP/REST Transport
my $rest_client = Google::Cloud::Dialogflow::V2->new(
credentials => $auth,
transport => 'rest',
);
# Execute service methods
my $res = $grpc_client->some_method( %params );
DESCRIPTION
Google::Cloud::Dialogflow::V2 is an auto-generated client library for Google Cloud Services.
It provides a unified client interface supporting both high-performance HTTP/2 gRPC and HTTP/REST transports, with automatic Google Cloud Application Default Credentials (ADC) resolution and typed Protocol Buffers message handling.
SOURCE
Generated from the following Protocol Buffers schemas:
googleapis/google/cloud/dialogflow/v2/agent.protogoogleapis/google/cloud/dialogflow/v2/agent_coaching_instruction.protogoogleapis/google/cloud/dialogflow/v2/answer_record.protogoogleapis/google/cloud/dialogflow/v2/audio_config.protogoogleapis/google/cloud/dialogflow/v2/ces_app.protogoogleapis/google/cloud/dialogflow/v2/ces_tool.protogoogleapis/google/cloud/dialogflow/v2/companion_agent.protogoogleapis/google/cloud/dialogflow/v2/context.protogoogleapis/google/cloud/dialogflow/v2/conversation.protogoogleapis/google/cloud/dialogflow/v2/conversation_dataset.protogoogleapis/google/cloud/dialogflow/v2/conversation_event.protogoogleapis/google/cloud/dialogflow/v2/conversation_model.protogoogleapis/google/cloud/dialogflow/v2/conversation_profile.protogoogleapis/google/cloud/dialogflow/v2/document.protogoogleapis/google/cloud/dialogflow/v2/encryption_spec.protogoogleapis/google/cloud/dialogflow/v2/entity_type.protogoogleapis/google/cloud/dialogflow/v2/environment.protogoogleapis/google/cloud/dialogflow/v2/fulfillment.protogoogleapis/google/cloud/dialogflow/v2/gcs.protogoogleapis/google/cloud/dialogflow/v2/generator.protogoogleapis/google/cloud/dialogflow/v2/generator_evaluation.protogoogleapis/google/cloud/dialogflow/v2/grounding.protogoogleapis/google/cloud/dialogflow/v2/human_agent_assistant_event.protogoogleapis/google/cloud/dialogflow/v2/intent.protogoogleapis/google/cloud/dialogflow/v2/knowledge_base.protogoogleapis/google/cloud/dialogflow/v2/operations.protogoogleapis/google/cloud/dialogflow/v2/participant.protogoogleapis/google/cloud/dialogflow/v2/session.protogoogleapis/google/cloud/dialogflow/v2/session_entity_type.protogoogleapis/google/cloud/dialogflow/v2/sip_trunk.protogoogleapis/google/cloud/dialogflow/v2/tool.protogoogleapis/google/cloud/dialogflow/v2/tool_call.protogoogleapis/google/cloud/dialogflow/v2/toolset.protogoogleapis/google/cloud/dialogflow/v2/validation_result.protogoogleapis/google/cloud/dialogflow/v2/version.protogoogleapis/google/cloud/dialogflow/v2/webhook.proto
CONSTRUCTOR
new
my $client = Google::Cloud::Dialogflow::V2->new(
credentials => $auth, # Optional: Google::Auth object (defaults to ADC)
transport => 'grpc', # Optional: 'grpc' (default) or 'rest'
);
ATTRIBUTES
credentials
Returns or accepts the Google::Auth credentials object.
transport
Returns or accepts the active transport object (Google::gRPC::Client or Google::Cloud::REST::Client).
METHODS
METHODS
The following RPC methods are available in this client:
get_agent
my $response = $client->get_agent( parent => $parent, );Calls the RPC method
GetAgentongoogle.cloud.dialogflow.v2.Agents.Request: Google::Cloud::Dialogflow::V2::Agent::GetAgentRequest
Returns: Google::Cloud::Dialogflow::V2::Agent::Agent
Parameters:
parent-string
list_answer_records
my $response = $client->list_answer_records( parent => $parent, filter => $filter, page_size => $page_size, page_token => $page_token, );Calls the RPC method
ListAnswerRecordsongoogle.cloud.dialogflow.v2.AnswerRecords.Request: Google::Cloud::Dialogflow::V2::AnswerRecord::ListAnswerRecordsRequest
Returns: Google::Cloud::Dialogflow::V2::AnswerRecord::ListAnswerRecordsResponse
Parameters:
parent-stringfilter-stringpage_size-int32page_token-string
create_companion_agent
my $response = $client->create_companion_agent( parent => $parent, companion_agent => $companion_agent, companion_agent_id => $companion_agent_id, );Calls the RPC method
CreateCompanionAgentongoogle.cloud.dialogflow.v2.CompanionAgents.Request: Google::Cloud::Dialogflow::V2::CompanionAgent::CreateCompanionAgentRequest
Returns: Google::Cloud::Dialogflow::V2::CompanionAgent::CompanionAgent
Parameters:
parent-stringcompanion_agent- Google::Cloud::Dialogflow::V2::CompanionAgent::CompanionAgentcompanion_agent_id-string
list_contexts
my $response = $client->list_contexts( parent => $parent, page_size => $page_size, page_token => $page_token, );Calls the RPC method
ListContextsongoogle.cloud.dialogflow.v2.Contexts.Request: Google::Cloud::Dialogflow::V2::Context::ListContextsRequest
Returns: Google::Cloud::Dialogflow::V2::Context::ListContextsResponse
Parameters:
parent-stringpage_size-int32page_token-string
create_conversation
my $response = $client->create_conversation( parent => $parent, conversation => $conversation, conversation_id => $conversation_id, );Calls the RPC method
CreateConversationongoogle.cloud.dialogflow.v2.Conversations.Request: Google::Cloud::Dialogflow::V2::Conversation::CreateConversationRequest
Returns: Google::Cloud::Dialogflow::V2::Conversation::Conversation
Parameters:
parent-stringconversation- Google::Cloud::Dialogflow::V2::Conversation::Conversationconversation_id-string
create_conversation_dataset
my $response = $client->create_conversation_dataset( parent => $parent, conversation_dataset => $conversation_dataset, );Calls the RPC method
CreateConversationDatasetongoogle.cloud.dialogflow.v2.ConversationDatasets.Request: Google::Cloud::Dialogflow::V2::ConversationDataset::CreateConversationDatasetRequest
Returns: Google::Longrunning::Operations::Operation
Parameters:
parent-stringconversation_dataset- Google::Cloud::Dialogflow::V2::ConversationDataset::ConversationDataset
create_conversation_model
my $response = $client->create_conversation_model( parent => $parent, conversation_model => $conversation_model, );Calls the RPC method
CreateConversationModelongoogle.cloud.dialogflow.v2.ConversationModels.Request: Google::Cloud::Dialogflow::V2::ConversationModel::CreateConversationModelRequest
Returns: Google::Longrunning::Operations::Operation
Parameters:
parent-stringconversation_model- Google::Cloud::Dialogflow::V2::ConversationModel::ConversationModel
list_conversation_profiles
my $response = $client->list_conversation_profiles( parent => $parent, page_size => $page_size, page_token => $page_token, );Calls the RPC method
ListConversationProfilesongoogle.cloud.dialogflow.v2.ConversationProfiles.Request: Google::Cloud::Dialogflow::V2::ConversationProfile::ListConversationProfilesRequest
Returns: Google::Cloud::Dialogflow::V2::ConversationProfile::ListConversationProfilesResponse
Parameters:
parent-stringpage_size-int32page_token-string
list_documents
my $response = $client->list_documents( parent => $parent, page_size => $page_size, page_token => $page_token, filter => $filter, );Calls the RPC method
ListDocumentsongoogle.cloud.dialogflow.v2.Documents.Request: Google::Cloud::Dialogflow::V2::Document::ListDocumentsRequest
Returns: Google::Cloud::Dialogflow::V2::Document::ListDocumentsResponse
Parameters:
parent-stringpage_size-int32page_token-stringfilter-string
get_encryption_spec
my $response = $client->get_encryption_spec( name => $name, );Calls the RPC method
GetEncryptionSpecongoogle.cloud.dialogflow.v2.EncryptionSpecService.Request: Google::Cloud::Dialogflow::V2::EncryptionSpec::GetEncryptionSpecRequest
Returns: Google::Cloud::Dialogflow::V2::EncryptionSpec::EncryptionSpec
Parameters:
name-string
initialize_encryption_spec
my $response = $client->initialize_encryption_spec( encryption_spec => $encryption_spec, );Calls the RPC method
InitializeEncryptionSpecongoogle.cloud.dialogflow.v2.EncryptionSpecService.Request: Google::Cloud::Dialogflow::V2::EncryptionSpec::InitializeEncryptionSpecRequest
Returns: Google::Longrunning::Operations::Operation
Parameters:
encryption_spec- Google::Cloud::Dialogflow::V2::EncryptionSpec::EncryptionSpec
list_entity_types
my $response = $client->list_entity_types( parent => $parent, language_code => $language_code, page_size => $page_size, page_token => $page_token, );Calls the RPC method
ListEntityTypesongoogle.cloud.dialogflow.v2.EntityTypes.Request: Google::Cloud::Dialogflow::V2::EntityType::ListEntityTypesRequest
Returns: Google::Cloud::Dialogflow::V2::EntityType::ListEntityTypesResponse
Parameters:
parent-stringlanguage_code-stringpage_size-int32page_token-string
update_entity_type
my $response = $client->update_entity_type( entity_type => $entity_type, language_code => $language_code, update_mask => $update_mask, );Calls the RPC method
UpdateEntityTypeongoogle.cloud.dialogflow.v2.EntityTypes.Request: Google::Cloud::Dialogflow::V2::EntityType::UpdateEntityTypeRequest
Returns: Google::Cloud::Dialogflow::V2::EntityType::EntityType
Parameters:
entity_type- Google::Cloud::Dialogflow::V2::EntityType::EntityTypelanguage_code-stringupdate_mask- Google::Protobuf::FieldMask::FieldMask
batch_delete_entity_types
my $response = $client->batch_delete_entity_types( parent => $parent, entity_type_names => [ ... ], );Calls the RPC method
BatchDeleteEntityTypesongoogle.cloud.dialogflow.v2.EntityTypes.Request: Google::Cloud::Dialogflow::V2::EntityType::BatchDeleteEntityTypesRequest
Returns: Google::Longrunning::Operations::Operation
Parameters:
parent-stringentity_type_names- ArrayRef ofstring
list_environments
my $response = $client->list_environments( parent => $parent, page_size => $page_size, page_token => $page_token, );Calls the RPC method
ListEnvironmentsongoogle.cloud.dialogflow.v2.Environments.Request: Google::Cloud::Dialogflow::V2::Environment::ListEnvironmentsRequest
Returns: Google::Cloud::Dialogflow::V2::Environment::ListEnvironmentsResponse
Parameters:
parent-stringpage_size-int32page_token-string
update_environment
my $response = $client->update_environment( environment => $environment, update_mask => $update_mask, allow_load_to_draft_and_discard_changes => $allow_load_to_draft_and_discard_changes, );Calls the RPC method
UpdateEnvironmentongoogle.cloud.dialogflow.v2.Environments.Request: Google::Cloud::Dialogflow::V2::Environment::UpdateEnvironmentRequest
Returns: Google::Cloud::Dialogflow::V2::Environment::Environment
Parameters:
environment- Google::Cloud::Dialogflow::V2::Environment::Environmentupdate_mask- Google::Protobuf::FieldMask::FieldMaskallow_load_to_draft_and_discard_changes-bool
get_fulfillment
my $response = $client->get_fulfillment( name => $name, );Calls the RPC method
GetFulfillmentongoogle.cloud.dialogflow.v2.Fulfillments.Request: Google::Cloud::Dialogflow::V2::Fulfillment::GetFulfillmentRequest
Returns: Google::Cloud::Dialogflow::V2::Fulfillment::Fulfillment
Parameters:
name-string
create_generator
my $response = $client->create_generator( parent => $parent, generator => $generator, generator_id => $generator_id, );Calls the RPC method
CreateGeneratorongoogle.cloud.dialogflow.v2.Generators.Request: Google::Cloud::Dialogflow::V2::Generator::CreateGeneratorRequest
Returns: Google::Cloud::Dialogflow::V2::Generator::Generator
Parameters:
parent-stringgenerator- Google::Cloud::Dialogflow::V2::Generator::Generatorgenerator_id-string
create_generator_evaluation
my $response = $client->create_generator_evaluation( parent => $parent, generator_evaluation => $generator_evaluation, );Calls the RPC method
CreateGeneratorEvaluationongoogle.cloud.dialogflow.v2.GeneratorEvaluations.Request: Google::Cloud::Dialogflow::V2::GeneratorEvaluation::CreateGeneratorEvaluationRequest
Returns: Google::Longrunning::Operations::Operation
Parameters:
parent-stringgenerator_evaluation- Google::Cloud::Dialogflow::V2::GeneratorEvaluation::GeneratorEvaluation
list_intents
my $response = $client->list_intents( parent => $parent, language_code => $language_code, intent_view => $intent_view, page_size => $page_size, page_token => $page_token, );Calls the RPC method
ListIntentsongoogle.cloud.dialogflow.v2.Intents.Request: Google::Cloud::Dialogflow::V2::Intent::ListIntentsRequest
Returns: Google::Cloud::Dialogflow::V2::Intent::ListIntentsResponse
Parameters:
parent-stringlanguage_code-stringintent_view- Google::Cloud::Dialogflow::V2::Intent::IntentViewpage_size-int32page_token-string
update_intent
my $response = $client->update_intent( intent => $intent, language_code => $language_code, update_mask => $update_mask, intent_view => $intent_view, );Calls the RPC method
UpdateIntentongoogle.cloud.dialogflow.v2.Intents.Request: Google::Cloud::Dialogflow::V2::Intent::UpdateIntentRequest
Returns: Google::Cloud::Dialogflow::V2::Intent::Intent
Parameters:
language_code-stringupdate_mask- Google::Protobuf::FieldMask::FieldMaskintent_view- Google::Cloud::Dialogflow::V2::Intent::IntentView
batch_delete_intents
my $response = $client->batch_delete_intents( parent => $parent, intents => [ ... ], );Calls the RPC method
BatchDeleteIntentsongoogle.cloud.dialogflow.v2.Intents.Request: Google::Cloud::Dialogflow::V2::Intent::BatchDeleteIntentsRequest
Returns: Google::Longrunning::Operations::Operation
Parameters:
parent-stringintents- ArrayRef of Google::Cloud::Dialogflow::V2::Intent::Intent
list_knowledge_bases
my $response = $client->list_knowledge_bases( parent => $parent, page_size => $page_size, page_token => $page_token, filter => $filter, );Calls the RPC method
ListKnowledgeBasesongoogle.cloud.dialogflow.v2.KnowledgeBases.Request: Google::Cloud::Dialogflow::V2::KnowledgeBase::ListKnowledgeBasesRequest
Returns: Google::Cloud::Dialogflow::V2::KnowledgeBase::ListKnowledgeBasesResponse
Parameters:
parent-stringpage_size-int32page_token-stringfilter-string
get_knowledge_base
my $response = $client->get_knowledge_base( name => $name, );Calls the RPC method
GetKnowledgeBaseongoogle.cloud.dialogflow.v2.KnowledgeBases.Request: Google::Cloud::Dialogflow::V2::KnowledgeBase::GetKnowledgeBaseRequest
Returns: Google::Cloud::Dialogflow::V2::KnowledgeBase::KnowledgeBase
Parameters:
name-string
delete_knowledge_base
my $response = $client->delete_knowledge_base( name => $name, force => $force, );Calls the RPC method
DeleteKnowledgeBaseongoogle.cloud.dialogflow.v2.KnowledgeBases.Request: Google::Cloud::Dialogflow::V2::KnowledgeBase::DeleteKnowledgeBaseRequest
Returns: Google::Protobuf::Empty::Empty
Parameters:
name-stringforce-bool
create_participant
my $response = $client->create_participant( parent => $parent, participant => $participant, );Calls the RPC method
CreateParticipantongoogle.cloud.dialogflow.v2.Participants.Request: Google::Cloud::Dialogflow::V2::Participant::CreateParticipantRequest
Returns: Google::Cloud::Dialogflow::V2::Participant::Participant
Parameters:
parent-stringparticipant- Google::Cloud::Dialogflow::V2::Participant::Participant
detect_intent
my $response = $client->detect_intent( session => $session, query_params => $query_params, query_input => $query_input, output_audio_config => $output_audio_config, output_audio_config_mask => $output_audio_config_mask, input_audio => $input_audio, );Calls the RPC method
DetectIntentongoogle.cloud.dialogflow.v2.Sessions.Request: Google::Cloud::Dialogflow::V2::Session::DetectIntentRequest
Returns: Google::Cloud::Dialogflow::V2::Session::DetectIntentResponse
Parameters:
session-stringquery_params- Google::Cloud::Dialogflow::V2::Session::QueryParametersquery_input- Google::Cloud::Dialogflow::V2::Session::QueryInputoutput_audio_config- Google::Cloud::Dialogflow::V2::AudioConfig::OutputAudioConfigoutput_audio_config_mask- Google::Protobuf::FieldMask::FieldMaskinput_audio-bytes
streaming_detect_intent
my $response = $client->streaming_detect_intent( session => $session, query_params => $query_params, query_input => $query_input, single_utterance => $single_utterance, output_audio_config => $output_audio_config, output_audio_config_mask => $output_audio_config_mask, input_audio => $input_audio, enable_debugging_info => $enable_debugging_info, );Calls the RPC method
StreamingDetectIntentongoogle.cloud.dialogflow.v2.Sessions.Request: Google::Cloud::Dialogflow::V2::Session::StreamingDetectIntentRequest
Returns: Google::Cloud::Dialogflow::V2::Session::StreamingDetectIntentResponse
Parameters:
session-stringquery_params- Google::Cloud::Dialogflow::V2::Session::QueryParametersquery_input- Google::Cloud::Dialogflow::V2::Session::QueryInputsingle_utterance-booloutput_audio_config- Google::Cloud::Dialogflow::V2::AudioConfig::OutputAudioConfigoutput_audio_config_mask- Google::Protobuf::FieldMask::FieldMaskinput_audio-bytesenable_debugging_info-bool
list_session_entity_types
my $response = $client->list_session_entity_types( parent => $parent, page_size => $page_size, page_token => $page_token, );Calls the RPC method
ListSessionEntityTypesongoogle.cloud.dialogflow.v2.SessionEntityTypes.Request: Google::Cloud::Dialogflow::V2::SessionEntityType::ListSessionEntityTypesRequest
Returns: Google::Cloud::Dialogflow::V2::SessionEntityType::ListSessionEntityTypesResponse
Parameters:
parent-stringpage_size-int32page_token-string
create_sip_trunk
my $response = $client->create_sip_trunk( parent => $parent, sip_trunk => $sip_trunk, );Calls the RPC method
CreateSipTrunkongoogle.cloud.dialogflow.v2.SipTrunks.Request: Google::Cloud::Dialogflow::V2::SipTrunk::CreateSipTrunkRequest
Returns: Google::Cloud::Dialogflow::V2::SipTrunk::SipTrunk
Parameters:
parent-stringsip_trunk- Google::Cloud::Dialogflow::V2::SipTrunk::SipTrunk
create_tool
my $response = $client->create_tool( parent => $parent, tool => $tool, tool_id => $tool_id, );Calls the RPC method
CreateToolongoogle.cloud.dialogflow.v2.Tools.Request: Google::Cloud::Dialogflow::V2::Tool::CreateToolRequest
Returns: Google::Cloud::Dialogflow::V2::Tool::Tool
Parameters:
parent-stringtool_id-string
list_versions
my $response = $client->list_versions( parent => $parent, page_size => $page_size, page_token => $page_token, );Calls the RPC method
ListVersionsongoogle.cloud.dialogflow.v2.Versions.Request: Google::Cloud::Dialogflow::V2::Version::ListVersionsRequest
Returns: Google::Cloud::Dialogflow::V2::Version::ListVersionsResponse
Parameters:
parent-stringpage_size-int32page_token-string
update_version
my $response = $client->update_version( version => $version, update_mask => $update_mask, );Calls the RPC method
UpdateVersionongoogle.cloud.dialogflow.v2.Versions.Request: Google::Cloud::Dialogflow::V2::Version::UpdateVersionRequest
Returns: Google::Cloud::Dialogflow::V2::Version::Version
Parameters:
update_mask- Google::Protobuf::FieldMask::FieldMask
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.