Returns the documents Resource.
create(parent, body=None, x__xgafv=None)
Creates a knowledge base.
delete(name, force=None, x__xgafv=None)
Deletes the specified knowledge base.
Retrieves the specified knowledge base.
list(parent, pageToken=None, pageSize=None, x__xgafv=None)
Returns the list of all knowledge bases of the specified agent.
list_next(previous_request, previous_response)
Retrieves the next page of results.
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates the specified knowledge base.
create(parent, body=None, x__xgafv=None)
Creates a knowledge base.
Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.
Args:
parent: string, Required. The project to create a knowledge base for.
Format: `projects/<Project ID>`. (required)
body: object, The request body.
The object takes the form of:
{ # Represents knowledge base resource.
#
# Note: The `projects.agent.knowledgeBases` resource is deprecated;
# only use `projects.knowledgeBases`.
"languageCode": "A String", # Language which represents the KnowledgeBase. When the KnowledgeBase is
# created/updated, this is populated for all non en-us languages. If not
# populated, the default language en-us applies.
"name": "A String", # The knowledge base resource name.
# The name must be empty when creating a knowledge base.
# Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
"displayName": "A String", # Required. The display name of the knowledge base. The name must be 1024
# bytes or less; otherwise, the creation request fails.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Represents knowledge base resource.
#
# Note: The `projects.agent.knowledgeBases` resource is deprecated;
# only use `projects.knowledgeBases`.
"languageCode": "A String", # Language which represents the KnowledgeBase. When the KnowledgeBase is
# created/updated, this is populated for all non en-us languages. If not
# populated, the default language en-us applies.
"name": "A String", # The knowledge base resource name.
# The name must be empty when creating a knowledge base.
# Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
"displayName": "A String", # Required. The display name of the knowledge base. The name must be 1024
# bytes or less; otherwise, the creation request fails.
}
delete(name, force=None, x__xgafv=None)
Deletes the specified knowledge base.
Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.
Args:
name: string, Required. The name of the knowledge base to delete.
Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`. (required)
force: boolean, Optional. Force deletes the knowledge base. When set to true, any documents
in the knowledge base are also deleted.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A generic empty message that you can re-use to avoid defining duplicated
# empty messages in your APIs. A typical example is to use it as the request
# or the response type of an API method. For instance:
#
# service Foo {
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
# }
#
# The JSON representation for `Empty` is empty JSON object `{}`.
}
get(name, x__xgafv=None)
Retrieves the specified knowledge base.
Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.
Args:
name: string, Required. The name of the knowledge base to retrieve.
Format `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`. (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Represents knowledge base resource.
#
# Note: The `projects.agent.knowledgeBases` resource is deprecated;
# only use `projects.knowledgeBases`.
"languageCode": "A String", # Language which represents the KnowledgeBase. When the KnowledgeBase is
# created/updated, this is populated for all non en-us languages. If not
# populated, the default language en-us applies.
"name": "A String", # The knowledge base resource name.
# The name must be empty when creating a knowledge base.
# Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
"displayName": "A String", # Required. The display name of the knowledge base. The name must be 1024
# bytes or less; otherwise, the creation request fails.
}
list(parent, pageToken=None, pageSize=None, x__xgafv=None)
Returns the list of all knowledge bases of the specified agent.
Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.
Args:
parent: string, Required. The project to list of knowledge bases for.
Format: `projects/<Project ID>`. (required)
pageToken: string, Optional. The next_page_token value returned from a previous list request.
pageSize: integer, Optional. The maximum number of items to return in a single page. By
default 10 and at most 100.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for KnowledgeBases.ListKnowledgeBases.
"nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no
# more results in the list.
"knowledgeBases": [ # The list of knowledge bases.
{ # Represents knowledge base resource.
#
# Note: The `projects.agent.knowledgeBases` resource is deprecated;
# only use `projects.knowledgeBases`.
"languageCode": "A String", # Language which represents the KnowledgeBase. When the KnowledgeBase is
# created/updated, this is populated for all non en-us languages. If not
# populated, the default language en-us applies.
"name": "A String", # The knowledge base resource name.
# The name must be empty when creating a knowledge base.
# Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
"displayName": "A String", # Required. The display name of the knowledge base. The name must be 1024
# bytes or less; otherwise, the creation request fails.
},
],
}
list_next(previous_request, previous_response)
Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call 'execute()' on to request the next
page. Returns None if there are no more items in the collection.
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates the specified knowledge base.
Note: The `projects.agent.knowledgeBases` resource is deprecated;
only use `projects.knowledgeBases`.
Args:
name: string, The knowledge base resource name.
The name must be empty when creating a knowledge base.
Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`. (required)
body: object, The request body.
The object takes the form of:
{ # Represents knowledge base resource.
#
# Note: The `projects.agent.knowledgeBases` resource is deprecated;
# only use `projects.knowledgeBases`.
"languageCode": "A String", # Language which represents the KnowledgeBase. When the KnowledgeBase is
# created/updated, this is populated for all non en-us languages. If not
# populated, the default language en-us applies.
"name": "A String", # The knowledge base resource name.
# The name must be empty when creating a knowledge base.
# Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
"displayName": "A String", # Required. The display name of the knowledge base. The name must be 1024
# bytes or less; otherwise, the creation request fails.
}
updateMask: string, Optional. Not specified means `update all`.
Currently, only `display_name` can be updated, an InvalidArgument will be
returned for attempting to update other fields.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Represents knowledge base resource.
#
# Note: The `projects.agent.knowledgeBases` resource is deprecated;
# only use `projects.knowledgeBases`.
"languageCode": "A String", # Language which represents the KnowledgeBase. When the KnowledgeBase is
# created/updated, this is populated for all non en-us languages. If not
# populated, the default language en-us applies.
"name": "A String", # The knowledge base resource name.
# The name must be empty when creating a knowledge base.
# Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
"displayName": "A String", # Required. The display name of the knowledge base. The name must be 1024
# bytes or less; otherwise, the creation request fails.
}