Skip to content

Commit

Permalink
feat(dialogflow): update the api
Browse files Browse the repository at this point in the history
#### dialogflow:v2

The following keys were added:
- resources.projects.resources.knowledgeBases.resources.documents.methods.import (Total Keys: 12)
- resources.projects.resources.locations.resources.knowledgeBases.resources.documents.methods.import (Total Keys: 12)
- schemas.GoogleCloudDialogflowV2GcsSources (Total Keys: 4)
- schemas.GoogleCloudDialogflowV2ImportDocumentTemplate (Total Keys: 7)
- schemas.GoogleCloudDialogflowV2ImportDocumentsRequest (Total Keys: 5)
- schemas.GoogleCloudDialogflowV2ImportDocumentsResponse (Total Keys: 4)
- schemas.GoogleCloudDialogflowV2KnowledgeOperationMetadata.properties.knowledgeBase.type (Total Keys: 1)

#### dialogflow:v2beta1

The following keys were added:
- schemas.GoogleCloudDialogflowV2ImportDocumentsResponse (Total Keys: 4)
- schemas.GoogleCloudDialogflowV2KnowledgeOperationMetadata.properties.knowledgeBase.type (Total Keys: 1)

#### dialogflow:v3

The following keys were added:
- schemas.GoogleCloudDialogflowV2ImportDocumentsResponse (Total Keys: 4)
- schemas.GoogleCloudDialogflowV2KnowledgeOperationMetadata.properties.knowledgeBase.type (Total Keys: 1)

#### dialogflow:v3beta1

The following keys were added:
- schemas.GoogleCloudDialogflowV2ImportDocumentsResponse (Total Keys: 4)
- schemas.GoogleCloudDialogflowV2KnowledgeOperationMetadata.properties.knowledgeBase.type (Total Keys: 1)
  • Loading branch information
yoshi-automation committed Jan 25, 2022
1 parent b6fdb23 commit 4d96721
Show file tree
Hide file tree
Showing 13 changed files with 363 additions and 45 deletions.
59 changes: 59 additions & 0 deletions docs/dyn/dialogflow_v2.projects.knowledgeBases.documents.html
Expand Up @@ -89,6 +89,9 @@ <h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Retrieves the specified document.</p>
<p class="toc_element">
<code><a href="#import_">import_(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates documents by importing data from external sources. Dialogflow supports up to 350 documents in each request. If you try to import more, Dialogflow will return an error. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: KnowledgeOperationMetadata - `response`: ImportDocumentsResponse</p>
<p class="toc_element">
<code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Returns the list of all documents of the knowledge base.</p>
Expand Down Expand Up @@ -295,6 +298,62 @@ <h3>Method Details</h3>
}</pre>
</div>

<div class="method">
<code class="details" id="import_">import_(parent, body=None, x__xgafv=None)</code>
<pre>Creates documents by importing data from external sources. Dialogflow supports up to 350 documents in each request. If you try to import more, Dialogflow will return an error. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: KnowledgeOperationMetadata - `response`: ImportDocumentsResponse

Args:
parent: string, Required. The knowledge base to import documents into. Format: `projects//locations//knowledgeBases/`. (required)
body: object, The request body.
The object takes the form of:

{ # Request message for Documents.ImportDocuments.
&quot;documentTemplate&quot;: { # The template used for importing documents. # Required. Document template used for importing all the documents.
&quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
&quot;A String&quot;,
],
&quot;metadata&quot;: { # Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document&#x27;s title, an external URL distinct from the document&#x27;s content_uri, etc. The max size of a `key` or a `value` of the metadata is 1024 bytes.
&quot;a_key&quot;: &quot;A String&quot;,
},
&quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of the document.
},
&quot;gcsSource&quot;: { # Google Cloud Storage location for the inputs. # The Google Cloud Storage location for the documents. The path can include a wildcard. These URIs may have the forms `gs:///`. `gs:////*.`.
&quot;uris&quot;: [ # Required. Google Cloud Storage URIs for the inputs. A URI is of the form: gs://bucket/object-prefix-or-name Whether a prefix or name is used depends on the use case.
&quot;A String&quot;,
],
},
&quot;importGcsCustomMetadata&quot;: True or False, # Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI.
}

x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # This resource represents a long-running operation that is the result of a network API call.
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
&quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
}</pre>
</div>

<div class="method">
<code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
<pre>Returns the list of all documents of the knowledge base.
Expand Down
Expand Up @@ -89,6 +89,9 @@ <h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Retrieves the specified document.</p>
<p class="toc_element">
<code><a href="#import_">import_(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates documents by importing data from external sources. Dialogflow supports up to 350 documents in each request. If you try to import more, Dialogflow will return an error. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: KnowledgeOperationMetadata - `response`: ImportDocumentsResponse</p>
<p class="toc_element">
<code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Returns the list of all documents of the knowledge base.</p>
Expand Down Expand Up @@ -295,6 +298,62 @@ <h3>Method Details</h3>
}</pre>
</div>

<div class="method">
<code class="details" id="import_">import_(parent, body=None, x__xgafv=None)</code>
<pre>Creates documents by importing data from external sources. Dialogflow supports up to 350 documents in each request. If you try to import more, Dialogflow will return an error. This method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields: - `metadata`: KnowledgeOperationMetadata - `response`: ImportDocumentsResponse

Args:
parent: string, Required. The knowledge base to import documents into. Format: `projects//locations//knowledgeBases/`. (required)
body: object, The request body.
The object takes the form of:

{ # Request message for Documents.ImportDocuments.
&quot;documentTemplate&quot;: { # The template used for importing documents. # Required. Document template used for importing all the documents.
&quot;knowledgeTypes&quot;: [ # Required. The knowledge type of document content.
&quot;A String&quot;,
],
&quot;metadata&quot;: { # Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document&#x27;s title, an external URL distinct from the document&#x27;s content_uri, etc. The max size of a `key` or a `value` of the metadata is 1024 bytes.
&quot;a_key&quot;: &quot;A String&quot;,
},
&quot;mimeType&quot;: &quot;A String&quot;, # Required. The MIME type of the document.
},
&quot;gcsSource&quot;: { # Google Cloud Storage location for the inputs. # The Google Cloud Storage location for the documents. The path can include a wildcard. These URIs may have the forms `gs:///`. `gs:////*.`.
&quot;uris&quot;: [ # Required. Google Cloud Storage URIs for the inputs. A URI is of the form: gs://bucket/object-prefix-or-name Whether a prefix or name is used depends on the use case.
&quot;A String&quot;,
],
},
&quot;importGcsCustomMetadata&quot;: True or False, # Whether to import custom metadata from Google Cloud Storage. Only valid when the document source is Google Cloud Storage URI.
}

x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # This resource represents a long-running operation that is the result of a network API call.
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
&quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
}</pre>
</div>

<div class="method">
<code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
<pre>Returns the list of all documents of the knowledge base.
Expand Down
Expand Up @@ -147,7 +147,7 @@ <h3>Method Details</h3>
&quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the environment (unique in an agent). Limit of 64 characters.
&quot;name&quot;: &quot;A String&quot;, # The name of the environment. Format: `projects//locations//agents//environments/`.
&quot;testCasesConfig&quot;: { # The configuration for continuous tests. # The test cases config for continuous tests of this environment.
&quot;enableContinuousRun&quot;: True or False, # Whether to run test cases in TestCasesConfig.test_cases periodically. Default false. If set to ture, run once a day.
&quot;enableContinuousRun&quot;: True or False, # Whether to run test cases in TestCasesConfig.test_cases periodically. Default false. If set to true, run once a day.
&quot;enablePredeploymentRun&quot;: True or False, # Whether to run test cases in TestCasesConfig.test_cases before deploying a flow version to the environment. Default false.
&quot;testCases&quot;: [ # A list of test case names to run. They should be under the same agent. Format of each test case name: `projects//locations/ /agents//testCases/`
&quot;A String&quot;,
Expand Down Expand Up @@ -269,7 +269,7 @@ <h3>Method Details</h3>
&quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the environment (unique in an agent). Limit of 64 characters.
&quot;name&quot;: &quot;A String&quot;, # The name of the environment. Format: `projects//locations//agents//environments/`.
&quot;testCasesConfig&quot;: { # The configuration for continuous tests. # The test cases config for continuous tests of this environment.
&quot;enableContinuousRun&quot;: True or False, # Whether to run test cases in TestCasesConfig.test_cases periodically. Default false. If set to ture, run once a day.
&quot;enableContinuousRun&quot;: True or False, # Whether to run test cases in TestCasesConfig.test_cases periodically. Default false. If set to true, run once a day.
&quot;enablePredeploymentRun&quot;: True or False, # Whether to run test cases in TestCasesConfig.test_cases before deploying a flow version to the environment. Default false.
&quot;testCases&quot;: [ # A list of test case names to run. They should be under the same agent. Format of each test case name: `projects//locations/ /agents//testCases/`
&quot;A String&quot;,
Expand Down Expand Up @@ -307,7 +307,7 @@ <h3>Method Details</h3>
&quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the environment (unique in an agent). Limit of 64 characters.
&quot;name&quot;: &quot;A String&quot;, # The name of the environment. Format: `projects//locations//agents//environments/`.
&quot;testCasesConfig&quot;: { # The configuration for continuous tests. # The test cases config for continuous tests of this environment.
&quot;enableContinuousRun&quot;: True or False, # Whether to run test cases in TestCasesConfig.test_cases periodically. Default false. If set to ture, run once a day.
&quot;enableContinuousRun&quot;: True or False, # Whether to run test cases in TestCasesConfig.test_cases periodically. Default false. If set to true, run once a day.
&quot;enablePredeploymentRun&quot;: True or False, # Whether to run test cases in TestCasesConfig.test_cases before deploying a flow version to the environment. Default false.
&quot;testCases&quot;: [ # A list of test case names to run. They should be under the same agent. Format of each test case name: `projects//locations/ /agents//testCases/`
&quot;A String&quot;,
Expand Down Expand Up @@ -362,7 +362,7 @@ <h3>Method Details</h3>
&quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the environment (unique in an agent). Limit of 64 characters.
&quot;name&quot;: &quot;A String&quot;, # The name of the environment. Format: `projects//locations//agents//environments/`.
&quot;testCasesConfig&quot;: { # The configuration for continuous tests. # The test cases config for continuous tests of this environment.
&quot;enableContinuousRun&quot;: True or False, # Whether to run test cases in TestCasesConfig.test_cases periodically. Default false. If set to ture, run once a day.
&quot;enableContinuousRun&quot;: True or False, # Whether to run test cases in TestCasesConfig.test_cases periodically. Default false. If set to true, run once a day.
&quot;enablePredeploymentRun&quot;: True or False, # Whether to run test cases in TestCasesConfig.test_cases before deploying a flow version to the environment. Default false.
&quot;testCases&quot;: [ # A list of test case names to run. They should be under the same agent. Format of each test case name: `projects//locations/ /agents//testCases/`
&quot;A String&quot;,
Expand Down Expand Up @@ -408,7 +408,7 @@ <h3>Method Details</h3>
&quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the environment (unique in an agent). Limit of 64 characters.
&quot;name&quot;: &quot;A String&quot;, # The name of the environment. Format: `projects//locations//agents//environments/`.
&quot;testCasesConfig&quot;: { # The configuration for continuous tests. # The test cases config for continuous tests of this environment.
&quot;enableContinuousRun&quot;: True or False, # Whether to run test cases in TestCasesConfig.test_cases periodically. Default false. If set to ture, run once a day.
&quot;enableContinuousRun&quot;: True or False, # Whether to run test cases in TestCasesConfig.test_cases periodically. Default false. If set to true, run once a day.
&quot;enablePredeploymentRun&quot;: True or False, # Whether to run test cases in TestCasesConfig.test_cases before deploying a flow version to the environment. Default false.
&quot;testCases&quot;: [ # A list of test case names to run. They should be under the same agent. Format of each test case name: `projects//locations/ /agents//testCases/`
&quot;A String&quot;,
Expand Down

0 comments on commit 4d96721

Please sign in to comment.