Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
feat(v3): added deployment API (#182)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 400785744

Source-Link: googleapis/googleapis@bf8851e

Source-Link: googleapis/googleapis-gen@139bae1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTM5YmFlMTg0MGU3ODg3ODk0ZmU2MzhkZjg5MGJiYWUwMzNjNzNkZSJ9

feat: exposed DTMF input info in the query result
docs: added notes on long running operation
  • Loading branch information
gcf-owl-bot[bot] committed Oct 4, 2021
1 parent e44d0ce commit 1383bf8
Show file tree
Hide file tree
Showing 42 changed files with 4,977 additions and 87 deletions.
10 changes: 10 additions & 0 deletions docs/dialogflowcx_v3/deployments.rst
@@ -0,0 +1,10 @@
Deployments
-----------------------------

.. automodule:: google.cloud.dialogflowcx_v3.services.deployments
:members:
:inherited-members:

.. automodule:: google.cloud.dialogflowcx_v3.services.deployments.pagers
:members:
:inherited-members:
1 change: 1 addition & 0 deletions docs/dialogflowcx_v3/services.rst
Expand Up @@ -4,6 +4,7 @@ Services for Google Cloud Dialogflowcx v3 API
:maxdepth: 2

agents
deployments
entity_types
environments
experiments
Expand Down
20 changes: 20 additions & 0 deletions google/cloud/dialogflowcx/__init__.py
Expand Up @@ -16,6 +16,10 @@

from google.cloud.dialogflowcx_v3.services.agents.client import AgentsClient
from google.cloud.dialogflowcx_v3.services.agents.async_client import AgentsAsyncClient
from google.cloud.dialogflowcx_v3.services.deployments.client import DeploymentsClient
from google.cloud.dialogflowcx_v3.services.deployments.async_client import (
DeploymentsAsyncClient,
)
from google.cloud.dialogflowcx_v3.services.entity_types.client import EntityTypesClient
from google.cloud.dialogflowcx_v3.services.entity_types.async_client import (
EntityTypesAsyncClient,
Expand Down Expand Up @@ -95,6 +99,10 @@
from google.cloud.dialogflowcx_v3.types.audio_config import OutputAudioEncoding
from google.cloud.dialogflowcx_v3.types.audio_config import SpeechModelVariant
from google.cloud.dialogflowcx_v3.types.audio_config import SsmlVoiceGender
from google.cloud.dialogflowcx_v3.types.deployment import Deployment
from google.cloud.dialogflowcx_v3.types.deployment import GetDeploymentRequest
from google.cloud.dialogflowcx_v3.types.deployment import ListDeploymentsRequest
from google.cloud.dialogflowcx_v3.types.deployment import ListDeploymentsResponse
from google.cloud.dialogflowcx_v3.types.entity_type import CreateEntityTypeRequest
from google.cloud.dialogflowcx_v3.types.entity_type import DeleteEntityTypeRequest
from google.cloud.dialogflowcx_v3.types.entity_type import EntityType
Expand All @@ -105,6 +113,9 @@
from google.cloud.dialogflowcx_v3.types.environment import ContinuousTestResult
from google.cloud.dialogflowcx_v3.types.environment import CreateEnvironmentRequest
from google.cloud.dialogflowcx_v3.types.environment import DeleteEnvironmentRequest
from google.cloud.dialogflowcx_v3.types.environment import DeployFlowMetadata
from google.cloud.dialogflowcx_v3.types.environment import DeployFlowRequest
from google.cloud.dialogflowcx_v3.types.environment import DeployFlowResponse
from google.cloud.dialogflowcx_v3.types.environment import Environment
from google.cloud.dialogflowcx_v3.types.environment import GetEnvironmentRequest
from google.cloud.dialogflowcx_v3.types.environment import (
Expand Down Expand Up @@ -312,6 +323,8 @@
__all__ = (
"AgentsClient",
"AgentsAsyncClient",
"DeploymentsClient",
"DeploymentsAsyncClient",
"EntityTypesClient",
"EntityTypesAsyncClient",
"EnvironmentsClient",
Expand Down Expand Up @@ -362,6 +375,10 @@
"OutputAudioEncoding",
"SpeechModelVariant",
"SsmlVoiceGender",
"Deployment",
"GetDeploymentRequest",
"ListDeploymentsRequest",
"ListDeploymentsResponse",
"CreateEntityTypeRequest",
"DeleteEntityTypeRequest",
"EntityType",
Expand All @@ -372,6 +389,9 @@
"ContinuousTestResult",
"CreateEnvironmentRequest",
"DeleteEnvironmentRequest",
"DeployFlowMetadata",
"DeployFlowRequest",
"DeployFlowResponse",
"Environment",
"GetEnvironmentRequest",
"ListContinuousTestResultsRequest",
Expand Down
18 changes: 18 additions & 0 deletions google/cloud/dialogflowcx_v3/__init__.py
Expand Up @@ -16,6 +16,8 @@

from .services.agents import AgentsClient
from .services.agents import AgentsAsyncClient
from .services.deployments import DeploymentsClient
from .services.deployments import DeploymentsAsyncClient
from .services.entity_types import EntityTypesClient
from .services.entity_types import EntityTypesAsyncClient
from .services.environments import EnvironmentsClient
Expand Down Expand Up @@ -67,6 +69,10 @@
from .types.audio_config import OutputAudioEncoding
from .types.audio_config import SpeechModelVariant
from .types.audio_config import SsmlVoiceGender
from .types.deployment import Deployment
from .types.deployment import GetDeploymentRequest
from .types.deployment import ListDeploymentsRequest
from .types.deployment import ListDeploymentsResponse
from .types.entity_type import CreateEntityTypeRequest
from .types.entity_type import DeleteEntityTypeRequest
from .types.entity_type import EntityType
Expand All @@ -77,6 +83,9 @@
from .types.environment import ContinuousTestResult
from .types.environment import CreateEnvironmentRequest
from .types.environment import DeleteEnvironmentRequest
from .types.environment import DeployFlowMetadata
from .types.environment import DeployFlowRequest
from .types.environment import DeployFlowResponse
from .types.environment import Environment
from .types.environment import GetEnvironmentRequest
from .types.environment import ListContinuousTestResultsRequest
Expand Down Expand Up @@ -237,6 +246,7 @@

__all__ = (
"AgentsAsyncClient",
"DeploymentsAsyncClient",
"EntityTypesAsyncClient",
"EnvironmentsAsyncClient",
"ExperimentsAsyncClient",
Expand Down Expand Up @@ -290,6 +300,11 @@
"DeleteTransitionRouteGroupRequest",
"DeleteVersionRequest",
"DeleteWebhookRequest",
"DeployFlowMetadata",
"DeployFlowRequest",
"DeployFlowResponse",
"Deployment",
"DeploymentsClient",
"DetectIntentRequest",
"DetectIntentResponse",
"DtmfInput",
Expand Down Expand Up @@ -317,6 +332,7 @@
"Fulfillment",
"GetAgentRequest",
"GetAgentValidationResultRequest",
"GetDeploymentRequest",
"GetEntityTypeRequest",
"GetEnvironmentRequest",
"GetExperimentRequest",
Expand Down Expand Up @@ -346,6 +362,8 @@
"ListAgentsResponse",
"ListContinuousTestResultsRequest",
"ListContinuousTestResultsResponse",
"ListDeploymentsRequest",
"ListDeploymentsResponse",
"ListEntityTypesRequest",
"ListEntityTypesResponse",
"ListEnvironmentsRequest",
Expand Down
44 changes: 44 additions & 0 deletions google/cloud/dialogflowcx_v3/gapic_metadata.json
Expand Up @@ -109,6 +109,40 @@
}
}
},
"Deployments": {
"clients": {
"grpc": {
"libraryClient": "DeploymentsClient",
"rpcs": {
"GetDeployment": {
"methods": [
"get_deployment"
]
},
"ListDeployments": {
"methods": [
"list_deployments"
]
}
}
},
"grpc-async": {
"libraryClient": "DeploymentsAsyncClient",
"rpcs": {
"GetDeployment": {
"methods": [
"get_deployment"
]
},
"ListDeployments": {
"methods": [
"list_deployments"
]
}
}
}
}
},
"EntityTypes": {
"clients": {
"grpc": {
Expand Down Expand Up @@ -188,6 +222,11 @@
"delete_environment"
]
},
"DeployFlow": {
"methods": [
"deploy_flow"
]
},
"GetEnvironment": {
"methods": [
"get_environment"
Expand Down Expand Up @@ -233,6 +272,11 @@
"delete_environment"
]
},
"DeployFlow": {
"methods": [
"deploy_flow"
]
},
"GetEnvironment": {
"methods": [
"get_environment"
Expand Down
15 changes: 13 additions & 2 deletions google/cloud/dialogflowcx_v3/services/agents/async_client.py
Expand Up @@ -606,8 +606,9 @@ async def export_agent(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Exports the specified agent to a binary file. This method is a
`long-running
r"""Exports the specified agent to a binary file.
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:
Expand Down Expand Up @@ -682,6 +683,16 @@ async def restore_agent(
existing resources in agent (e.g. intents, entity types, flows)
will be removed.
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``: An empty `Struct
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
- ``response``: An `Empty
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
Note: You should always train flows prior to sending them
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Expand Down
15 changes: 13 additions & 2 deletions google/cloud/dialogflowcx_v3/services/agents/client.py
Expand Up @@ -871,8 +871,9 @@ def export_agent(
timeout: float = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Exports the specified agent to a binary file. This method is a
`long-running
r"""Exports the specified agent to a binary file.
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:
Expand Down Expand Up @@ -948,6 +949,16 @@ def restore_agent(
existing resources in agent (e.g. intents, entity types, flows)
will be removed.
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``: An empty `Struct
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
- ``response``: An `Empty
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
Note: You should always train flows prior to sending them
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Expand Down
15 changes: 13 additions & 2 deletions google/cloud/dialogflowcx_v3/services/agents/transports/grpc.py
Expand Up @@ -385,8 +385,9 @@ def export_agent(
) -> Callable[[agent.ExportAgentRequest], operations_pb2.Operation]:
r"""Return a callable for the export agent method over gRPC.
Exports the specified agent to a binary file. This method is a
`long-running
Exports the specified agent to a binary file.
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:
Expand Down Expand Up @@ -426,6 +427,16 @@ def restore_agent(
existing resources in agent (e.g. intents, entity types, flows)
will be removed.
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``: An empty `Struct
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
- ``response``: An `Empty
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
Note: You should always train flows prior to sending them
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Expand Down
Expand Up @@ -392,8 +392,9 @@ def export_agent(
) -> Callable[[agent.ExportAgentRequest], Awaitable[operations_pb2.Operation]]:
r"""Return a callable for the export agent method over gRPC.
Exports the specified agent to a binary file. This method is a
`long-running
Exports the specified agent to a binary file.
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:
Expand Down Expand Up @@ -433,6 +434,16 @@ def restore_agent(
existing resources in agent (e.g. intents, entity types, flows)
will be removed.
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``: An empty `Struct
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
- ``response``: An `Empty
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
Note: You should always train flows prior to sending them
queries. See the `training
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Expand Down
22 changes: 22 additions & 0 deletions google/cloud/dialogflowcx_v3/services/deployments/__init__.py
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .client import DeploymentsClient
from .async_client import DeploymentsAsyncClient

__all__ = (
"DeploymentsClient",
"DeploymentsAsyncClient",
)

0 comments on commit 1383bf8

Please sign in to comment.