Service Client: Google::Cloud::Dialogflow::V2::KnowledgeBase::KnowledgeBasesClient

Client stub representing the remote KnowledgeBases 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::KnowledgeBase - Compiled Protocol Buffers messages for google/cloud/dialogflow/v2/knowledge_base.proto

SYNOPSIS

use Google::Cloud::Dialogflow::V2::KnowledgeBase;

my $msg = Google::Cloud::Dialogflow::V2::KnowledgeBase::KnowledgeBase->new({
    name => $name,
    display_name => $display_name,
    language_code => $language_code,
});

# Read or update a field
my $val = $msg->name();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Dialogflow::V2::KnowledgeBase::KnowledgeBase->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/dialogflow/v2/knowledge_base.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::KnowledgeBase::KnowledgeBase

A knowledge base represents a collection of knowledge documents that you provide to Dialogflow. Your knowledge documents contain information that may be useful during conversations with end-users. Some Dialogflow features use knowledge bases when looking for a response to an end-user input.

For more information, see the [knowledge base guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases).

Note: The `projects.agent.knowledgeBases` resource is deprecated; only use `projects.knowledgeBases`.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The knowledge base resource name. The name must be empty when creating a knowledge base. Format: `projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>`.

  • $msg->display_name() / $msg->display_name($value)

    Type: String

    Required. The display name of the knowledge base. The name must be 1024 bytes or less; otherwise, the creation request fails.

  • $msg->language_code() / $msg->language_code($value)

    Type: String

    Language which represents the KnowledgeBase. When the KnowledgeBase is created/updated, expect this to be present for non en-us languages. When unspecified, the default language code en-us applies.

Google::Cloud::Dialogflow::V2::KnowledgeBase::ListKnowledgeBasesRequest

Request message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBases.ListKnowledgeBases].

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The project to list of knowledge bases for. Format: `projects/<Project ID>/locations/<Location ID>`.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    The maximum number of items to return in a single page. By default 10 and at most 100.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    The next_page_token value returned from a previous list request.

  • $msg->filter() / $msg->filter($value)

    Type: String

    The filter expression used to filter knowledge bases returned by the list method. The expression has the following syntax:

    <field> <operator> <value> [AND <field> <operator> <value>] ...

    The following fields and operators are supported:

    * display_name with has(:) operator * language_code with equals(=) operator

    Examples:

    * 'language_code=en-us' matches knowledge bases with en-us language code. * 'display_name:articles' matches knowledge bases whose display name contains "articles". * 'display_name:"Best Articles"' matches knowledge bases whose display name contains "Best Articles". * 'language_code=en-gb AND display_name=articles' matches all knowledge bases whose display name contains "articles" and whose language code is "en-gb".

    Note: An empty filter string (i.e. "") is a no-op and will result in no filtering.

    For more information about filtering, see [API Filtering](https://aip.dev/160).

Google::Cloud::Dialogflow::V2::KnowledgeBase::ListKnowledgeBasesResponse

Response message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBases.ListKnowledgeBases].

Inherits from Protobuf::Message.

Accessors

  • $msg->knowledge_bases() / $msg->knowledge_bases($value)

    Type: Message (Google::Cloud::Dialogflow::V2::KnowledgeBase::KnowledgeBase)

    The list of knowledge bases.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    Token to retrieve the next page of results, or empty if there are no more results in the list.

Google::Cloud::Dialogflow::V2::KnowledgeBase::GetKnowledgeBaseRequest

Request message for [KnowledgeBases.GetKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.GetKnowledgeBase].

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The name of the knowledge base to retrieve. Format `projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>`.

Google::Cloud::Dialogflow::V2::KnowledgeBase::CreateKnowledgeBaseRequest

Request message for [KnowledgeBases.CreateKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.CreateKnowledgeBase].

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The project to create a knowledge base for. Format: `projects/<Project ID>/locations/<Location ID>`.

  • $msg->knowledge_base() / $msg->knowledge_base($value)

    Type: Message (Google::Cloud::Dialogflow::V2::KnowledgeBase::KnowledgeBase)

    Required. The knowledge base to create.

Google::Cloud::Dialogflow::V2::KnowledgeBase::DeleteKnowledgeBaseRequest

Request message for [KnowledgeBases.DeleteKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.DeleteKnowledgeBase].

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The name of the knowledge base to delete. Format: `projects/<Project ID>/locations/<Location ID>/knowledgeBases/<Knowledge Base ID>`.

  • $msg->force() / $msg->force($value)

    Type: Bool

    Optional. Force deletes the knowledge base. When set to true, any documents in the knowledge base are also deleted.

Google::Cloud::Dialogflow::V2::KnowledgeBase::UpdateKnowledgeBaseRequest

Request message for [KnowledgeBases.UpdateKnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBases.UpdateKnowledgeBase].

Inherits from Protobuf::Message.

Accessors

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Dialogflow::V2::KnowledgeBase::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.