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

Commit 1383bf8

Browse files
feat(v3): added deployment API (#182)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 400785744 Source-Link: googleapis/googleapis@bf8851e Source-Link: https://github.com/googleapis/googleapis-gen/commit/139bae1840e7887894fe638df890bbae033c73de Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTM5YmFlMTg0MGU3ODg3ODk0ZmU2MzhkZjg5MGJiYWUwMzNjNzNkZSJ9 feat: exposed DTMF input info in the query result docs: added notes on long running operation
1 parent e44d0ce commit 1383bf8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+4977
-87
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Deployments
2+
-----------------------------
3+
4+
.. automodule:: google.cloud.dialogflowcx_v3.services.deployments
5+
:members:
6+
:inherited-members:
7+
8+
.. automodule:: google.cloud.dialogflowcx_v3.services.deployments.pagers
9+
:members:
10+
:inherited-members:

docs/dialogflowcx_v3/services.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Services for Google Cloud Dialogflowcx v3 API
44
:maxdepth: 2
55

66
agents
7+
deployments
78
entity_types
89
environments
910
experiments

google/cloud/dialogflowcx/__init__.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616

1717
from google.cloud.dialogflowcx_v3.services.agents.client import AgentsClient
1818
from google.cloud.dialogflowcx_v3.services.agents.async_client import AgentsAsyncClient
19+
from google.cloud.dialogflowcx_v3.services.deployments.client import DeploymentsClient
20+
from google.cloud.dialogflowcx_v3.services.deployments.async_client import (
21+
DeploymentsAsyncClient,
22+
)
1923
from google.cloud.dialogflowcx_v3.services.entity_types.client import EntityTypesClient
2024
from google.cloud.dialogflowcx_v3.services.entity_types.async_client import (
2125
EntityTypesAsyncClient,
@@ -95,6 +99,10 @@
9599
from google.cloud.dialogflowcx_v3.types.audio_config import OutputAudioEncoding
96100
from google.cloud.dialogflowcx_v3.types.audio_config import SpeechModelVariant
97101
from google.cloud.dialogflowcx_v3.types.audio_config import SsmlVoiceGender
102+
from google.cloud.dialogflowcx_v3.types.deployment import Deployment
103+
from google.cloud.dialogflowcx_v3.types.deployment import GetDeploymentRequest
104+
from google.cloud.dialogflowcx_v3.types.deployment import ListDeploymentsRequest
105+
from google.cloud.dialogflowcx_v3.types.deployment import ListDeploymentsResponse
98106
from google.cloud.dialogflowcx_v3.types.entity_type import CreateEntityTypeRequest
99107
from google.cloud.dialogflowcx_v3.types.entity_type import DeleteEntityTypeRequest
100108
from google.cloud.dialogflowcx_v3.types.entity_type import EntityType
@@ -105,6 +113,9 @@
105113
from google.cloud.dialogflowcx_v3.types.environment import ContinuousTestResult
106114
from google.cloud.dialogflowcx_v3.types.environment import CreateEnvironmentRequest
107115
from google.cloud.dialogflowcx_v3.types.environment import DeleteEnvironmentRequest
116+
from google.cloud.dialogflowcx_v3.types.environment import DeployFlowMetadata
117+
from google.cloud.dialogflowcx_v3.types.environment import DeployFlowRequest
118+
from google.cloud.dialogflowcx_v3.types.environment import DeployFlowResponse
108119
from google.cloud.dialogflowcx_v3.types.environment import Environment
109120
from google.cloud.dialogflowcx_v3.types.environment import GetEnvironmentRequest
110121
from google.cloud.dialogflowcx_v3.types.environment import (
@@ -312,6 +323,8 @@
312323
__all__ = (
313324
"AgentsClient",
314325
"AgentsAsyncClient",
326+
"DeploymentsClient",
327+
"DeploymentsAsyncClient",
315328
"EntityTypesClient",
316329
"EntityTypesAsyncClient",
317330
"EnvironmentsClient",
@@ -362,6 +375,10 @@
362375
"OutputAudioEncoding",
363376
"SpeechModelVariant",
364377
"SsmlVoiceGender",
378+
"Deployment",
379+
"GetDeploymentRequest",
380+
"ListDeploymentsRequest",
381+
"ListDeploymentsResponse",
365382
"CreateEntityTypeRequest",
366383
"DeleteEntityTypeRequest",
367384
"EntityType",
@@ -372,6 +389,9 @@
372389
"ContinuousTestResult",
373390
"CreateEnvironmentRequest",
374391
"DeleteEnvironmentRequest",
392+
"DeployFlowMetadata",
393+
"DeployFlowRequest",
394+
"DeployFlowResponse",
375395
"Environment",
376396
"GetEnvironmentRequest",
377397
"ListContinuousTestResultsRequest",

google/cloud/dialogflowcx_v3/__init__.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
from .services.agents import AgentsClient
1818
from .services.agents import AgentsAsyncClient
19+
from .services.deployments import DeploymentsClient
20+
from .services.deployments import DeploymentsAsyncClient
1921
from .services.entity_types import EntityTypesClient
2022
from .services.entity_types import EntityTypesAsyncClient
2123
from .services.environments import EnvironmentsClient
@@ -67,6 +69,10 @@
6769
from .types.audio_config import OutputAudioEncoding
6870
from .types.audio_config import SpeechModelVariant
6971
from .types.audio_config import SsmlVoiceGender
72+
from .types.deployment import Deployment
73+
from .types.deployment import GetDeploymentRequest
74+
from .types.deployment import ListDeploymentsRequest
75+
from .types.deployment import ListDeploymentsResponse
7076
from .types.entity_type import CreateEntityTypeRequest
7177
from .types.entity_type import DeleteEntityTypeRequest
7278
from .types.entity_type import EntityType
@@ -77,6 +83,9 @@
7783
from .types.environment import ContinuousTestResult
7884
from .types.environment import CreateEnvironmentRequest
7985
from .types.environment import DeleteEnvironmentRequest
86+
from .types.environment import DeployFlowMetadata
87+
from .types.environment import DeployFlowRequest
88+
from .types.environment import DeployFlowResponse
8089
from .types.environment import Environment
8190
from .types.environment import GetEnvironmentRequest
8291
from .types.environment import ListContinuousTestResultsRequest
@@ -237,6 +246,7 @@
237246

238247
__all__ = (
239248
"AgentsAsyncClient",
249+
"DeploymentsAsyncClient",
240250
"EntityTypesAsyncClient",
241251
"EnvironmentsAsyncClient",
242252
"ExperimentsAsyncClient",
@@ -290,6 +300,11 @@
290300
"DeleteTransitionRouteGroupRequest",
291301
"DeleteVersionRequest",
292302
"DeleteWebhookRequest",
303+
"DeployFlowMetadata",
304+
"DeployFlowRequest",
305+
"DeployFlowResponse",
306+
"Deployment",
307+
"DeploymentsClient",
293308
"DetectIntentRequest",
294309
"DetectIntentResponse",
295310
"DtmfInput",
@@ -317,6 +332,7 @@
317332
"Fulfillment",
318333
"GetAgentRequest",
319334
"GetAgentValidationResultRequest",
335+
"GetDeploymentRequest",
320336
"GetEntityTypeRequest",
321337
"GetEnvironmentRequest",
322338
"GetExperimentRequest",
@@ -346,6 +362,8 @@
346362
"ListAgentsResponse",
347363
"ListContinuousTestResultsRequest",
348364
"ListContinuousTestResultsResponse",
365+
"ListDeploymentsRequest",
366+
"ListDeploymentsResponse",
349367
"ListEntityTypesRequest",
350368
"ListEntityTypesResponse",
351369
"ListEnvironmentsRequest",

google/cloud/dialogflowcx_v3/gapic_metadata.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,40 @@
109109
}
110110
}
111111
},
112+
"Deployments": {
113+
"clients": {
114+
"grpc": {
115+
"libraryClient": "DeploymentsClient",
116+
"rpcs": {
117+
"GetDeployment": {
118+
"methods": [
119+
"get_deployment"
120+
]
121+
},
122+
"ListDeployments": {
123+
"methods": [
124+
"list_deployments"
125+
]
126+
}
127+
}
128+
},
129+
"grpc-async": {
130+
"libraryClient": "DeploymentsAsyncClient",
131+
"rpcs": {
132+
"GetDeployment": {
133+
"methods": [
134+
"get_deployment"
135+
]
136+
},
137+
"ListDeployments": {
138+
"methods": [
139+
"list_deployments"
140+
]
141+
}
142+
}
143+
}
144+
}
145+
},
112146
"EntityTypes": {
113147
"clients": {
114148
"grpc": {
@@ -188,6 +222,11 @@
188222
"delete_environment"
189223
]
190224
},
225+
"DeployFlow": {
226+
"methods": [
227+
"deploy_flow"
228+
]
229+
},
191230
"GetEnvironment": {
192231
"methods": [
193232
"get_environment"
@@ -233,6 +272,11 @@
233272
"delete_environment"
234273
]
235274
},
275+
"DeployFlow": {
276+
"methods": [
277+
"deploy_flow"
278+
]
279+
},
236280
"GetEnvironment": {
237281
"methods": [
238282
"get_environment"

google/cloud/dialogflowcx_v3/services/agents/async_client.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,9 @@ async def export_agent(
606606
timeout: float = None,
607607
metadata: Sequence[Tuple[str, str]] = (),
608608
) -> operation_async.AsyncOperation:
609-
r"""Exports the specified agent to a binary file. This method is a
610-
`long-running
609+
r"""Exports the specified agent to a binary file.
610+
611+
This method is a `long-running
611612
operation <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>`__.
612613
The returned ``Operation`` type has the following
613614
method-specific fields:
@@ -682,6 +683,16 @@ async def restore_agent(
682683
existing resources in agent (e.g. intents, entity types, flows)
683684
will be removed.
684685
686+
This method is a `long-running
687+
operation <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>`__.
688+
The returned ``Operation`` type has the following
689+
method-specific fields:
690+
691+
- ``metadata``: An empty `Struct
692+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
693+
- ``response``: An `Empty
694+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
695+
685696
Note: You should always train flows prior to sending them
686697
queries. See the `training
687698
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.

google/cloud/dialogflowcx_v3/services/agents/client.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,8 +871,9 @@ def export_agent(
871871
timeout: float = None,
872872
metadata: Sequence[Tuple[str, str]] = (),
873873
) -> operation.Operation:
874-
r"""Exports the specified agent to a binary file. This method is a
875-
`long-running
874+
r"""Exports the specified agent to a binary file.
875+
876+
This method is a `long-running
876877
operation <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>`__.
877878
The returned ``Operation`` type has the following
878879
method-specific fields:
@@ -948,6 +949,16 @@ def restore_agent(
948949
existing resources in agent (e.g. intents, entity types, flows)
949950
will be removed.
950951
952+
This method is a `long-running
953+
operation <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>`__.
954+
The returned ``Operation`` type has the following
955+
method-specific fields:
956+
957+
- ``metadata``: An empty `Struct
958+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
959+
- ``response``: An `Empty
960+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
961+
951962
Note: You should always train flows prior to sending them
952963
queries. See the `training
953964
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.

google/cloud/dialogflowcx_v3/services/agents/transports/grpc.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,9 @@ def export_agent(
385385
) -> Callable[[agent.ExportAgentRequest], operations_pb2.Operation]:
386386
r"""Return a callable for the export agent method over gRPC.
387387
388-
Exports the specified agent to a binary file. This method is a
389-
`long-running
388+
Exports the specified agent to a binary file.
389+
390+
This method is a `long-running
390391
operation <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>`__.
391392
The returned ``Operation`` type has the following
392393
method-specific fields:
@@ -426,6 +427,16 @@ def restore_agent(
426427
existing resources in agent (e.g. intents, entity types, flows)
427428
will be removed.
428429
430+
This method is a `long-running
431+
operation <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>`__.
432+
The returned ``Operation`` type has the following
433+
method-specific fields:
434+
435+
- ``metadata``: An empty `Struct
436+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
437+
- ``response``: An `Empty
438+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
439+
429440
Note: You should always train flows prior to sending them
430441
queries. See the `training
431442
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.

google/cloud/dialogflowcx_v3/services/agents/transports/grpc_asyncio.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,9 @@ def export_agent(
392392
) -> Callable[[agent.ExportAgentRequest], Awaitable[operations_pb2.Operation]]:
393393
r"""Return a callable for the export agent method over gRPC.
394394
395-
Exports the specified agent to a binary file. This method is a
396-
`long-running
395+
Exports the specified agent to a binary file.
396+
397+
This method is a `long-running
397398
operation <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>`__.
398399
The returned ``Operation`` type has the following
399400
method-specific fields:
@@ -433,6 +434,16 @@ def restore_agent(
433434
existing resources in agent (e.g. intents, entity types, flows)
434435
will be removed.
435436
437+
This method is a `long-running
438+
operation <https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation>`__.
439+
The returned ``Operation`` type has the following
440+
method-specific fields:
441+
442+
- ``metadata``: An empty `Struct
443+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct>`__
444+
- ``response``: An `Empty
445+
message <https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty>`__
446+
436447
Note: You should always train flows prior to sending them
437448
queries. See the `training
438449
documentation <https://cloud.google.com/dialogflow/cx/docs/concept/training>`__.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
from .client import DeploymentsClient
17+
from .async_client import DeploymentsAsyncClient
18+
19+
__all__ = (
20+
"DeploymentsClient",
21+
"DeploymentsAsyncClient",
22+
)

0 commit comments

Comments
 (0)