Skip to content
Permalink
Browse files

feat: regenerate (#151)

* build: fix synth

* fix: more _pb2 modifications

* docs: fix docstring in intent_pb2

* chore: blacken new additions

* fix: resynth to get lost changes

* chore: blacken tests directory
  • Loading branch information
busunkim96 authored and nnegrey committed Oct 16, 2019
1 parent 72cbc0c commit 6222277a5332011e9cc2e80bb5b26692a12fad36
Showing with 8,224 additions and 8,207 deletions.
  1. +0 −1 MANIFEST.in
  2. +1 −0 dialogflow_v2/__init__.py
  3. +187 −56 dialogflow_v2/gapic/agents_client.py
  4. +10 −0 dialogflow_v2/gapic/agents_client_config.py
  5. +35 −18 dialogflow_v2/gapic/contexts_client.py
  6. +51 −34 dialogflow_v2/gapic/entity_types_client.py
  7. +84 −1 dialogflow_v2/gapic/enums.py
  8. +42 −25 dialogflow_v2/gapic/intents_client.py
  9. +57 −16 dialogflow_v2/gapic/session_entity_types_client.py
  10. +22 −5 dialogflow_v2/gapic/sessions_client.py
  11. +2 −2 dialogflow_v2/gapic/sessions_client_config.py
  12. +41 −3 dialogflow_v2/gapic/transports/agents_grpc_transport.py
  13. +15 −3 dialogflow_v2/gapic/transports/contexts_grpc_transport.py
  14. +15 −3 dialogflow_v2/gapic/transports/entity_types_grpc_transport.py
  15. +15 −3 dialogflow_v2/gapic/transports/intents_grpc_transport.py
  16. +35 −3 dialogflow_v2/gapic/transports/session_entity_types_grpc_transport.py
  17. +15 −3 dialogflow_v2/gapic/transports/sessions_grpc_transport.py
  18. +0 −335 dialogflow_v2/proto/agent.proto
  19. +400 −94 dialogflow_v2/proto/agent_pb2.py
  20. +41 −6 dialogflow_v2/proto/agent_pb2_grpc.py
  21. +0 −126 dialogflow_v2/proto/audio_config.proto
  22. +321 −13 dialogflow_v2/proto/audio_config_pb2.py
  23. +0 −185 dialogflow_v2/proto/context.proto
  24. +64 −37 dialogflow_v2/proto/context_pb2.py
  25. +2 −2 dialogflow_v2/proto/context_pb2_grpc.py
  26. +0 −436 dialogflow_v2/proto/entity_type.proto
  27. +195 −118 dialogflow_v2/proto/entity_type_pb2.py
  28. +2 −2 dialogflow_v2/proto/entity_type_pb2_grpc.py
  29. +0 −848 dialogflow_v2/proto/intent.proto
  30. +311 −202 dialogflow_v2/proto/intent_pb2.py
  31. +2 −2 dialogflow_v2/proto/intent_pb2_grpc.py
  32. +0 −555 dialogflow_v2/proto/session.proto
  33. +0 −195 dialogflow_v2/proto/session_entity_type.proto
  34. +63 −37 dialogflow_v2/proto/session_entity_type_pb2.py
  35. +30 −2 dialogflow_v2/proto/session_entity_type_pb2_grpc.py
  36. +176 −323 dialogflow_v2/proto/session_pb2.py
  37. +0 −128 dialogflow_v2/proto/webhook.proto
  38. +45 −8 dialogflow_v2/proto/webhook_pb2.py
  39. +4 −1 dialogflow_v2/types.py
  40. +1 −0 dialogflow_v2beta1/__init__.py
  41. +264 −55 dialogflow_v2beta1/gapic/agents_client.py
  42. +15 −0 dialogflow_v2beta1/gapic/agents_client_config.py
  43. +36 −18 dialogflow_v2beta1/gapic/contexts_client.py
  44. +94 −25 dialogflow_v2beta1/gapic/documents_client.py
  45. +53 −34 dialogflow_v2beta1/gapic/entity_types_client.py
  46. +244 −0 dialogflow_v2beta1/gapic/enums.py
  47. +44 −25 dialogflow_v2beta1/gapic/intents_client.py
  48. +54 −17 dialogflow_v2beta1/gapic/knowledge_bases_client.py
  49. +59 −16 dialogflow_v2beta1/gapic/session_entity_types_client.py
  50. +26 −7 dialogflow_v2beta1/gapic/sessions_client.py
  51. +2 −2 dialogflow_v2beta1/gapic/sessions_client_config.py
  52. +55 −3 dialogflow_v2beta1/gapic/transports/agents_grpc_transport.py
  53. +15 −3 dialogflow_v2beta1/gapic/transports/contexts_grpc_transport.py
  54. +40 −6 dialogflow_v2beta1/gapic/transports/documents_grpc_transport.py
  55. +15 −3 dialogflow_v2beta1/gapic/transports/entity_types_grpc_transport.py
  56. +15 −3 dialogflow_v2beta1/gapic/transports/intents_grpc_transport.py
  57. +30 −3 dialogflow_v2beta1/gapic/transports/knowledge_bases_grpc_transport.py
  58. +35 −3 dialogflow_v2beta1/gapic/transports/session_entity_types_grpc_transport.py
  59. +15 −3 dialogflow_v2beta1/gapic/transports/sessions_grpc_transport.py
  60. +0 −339 dialogflow_v2beta1/proto/agent.proto
  61. +444 −73 dialogflow_v2beta1/proto/agent_pb2.py
  62. +62 −6 dialogflow_v2beta1/proto/agent_pb2_grpc.py
  63. +0 −216 dialogflow_v2beta1/proto/audio_config.proto
  64. +403 −28 dialogflow_v2beta1/proto/audio_config_pb2.py
  65. +0 −229 dialogflow_v2beta1/proto/context.proto
  66. +33 −30 dialogflow_v2beta1/proto/context_pb2.py
  67. +2 −2 dialogflow_v2beta1/proto/context_pb2_grpc.py
  68. +0 −270 dialogflow_v2beta1/proto/document.proto
  69. +84 −32 dialogflow_v2beta1/proto/document_pb2.py
  70. +20 −0 dialogflow_v2beta1/proto/document_pb2_grpc.py
  71. +0 −436 dialogflow_v2beta1/proto/entity_type.proto
  72. +100 −79 dialogflow_v2beta1/proto/entity_type_pb2.py
  73. +2 −2 dialogflow_v2beta1/proto/entity_type_pb2_grpc.py
  74. +98 −0 dialogflow_v2beta1/proto/gcs_pb2.py
  75. +2 −0 dialogflow_v2beta1/proto/gcs_pb2_grpc.py
  76. +0 −924 dialogflow_v2beta1/proto/intent.proto
  77. +2,649 −170 dialogflow_v2beta1/proto/intent_pb2.py
  78. +2 −2 dialogflow_v2beta1/proto/intent_pb2_grpc.py
  79. +0 −168 dialogflow_v2beta1/proto/knowledge_base.proto
  80. +25 −22 dialogflow_v2beta1/proto/knowledge_base_pb2.py
  81. +15 −0 dialogflow_v2beta1/proto/knowledge_base_pb2_grpc.py
  82. +0 −586 dialogflow_v2beta1/proto/session.proto
  83. +0 −233 dialogflow_v2beta1/proto/session_entity_type.proto
  84. +30 −27 dialogflow_v2beta1/proto/session_entity_type_pb2.py
  85. +30 −2 dialogflow_v2beta1/proto/session_entity_type_pb2_grpc.py
  86. +223 −104 dialogflow_v2beta1/proto/session_pb2.py
  87. +240 −0 dialogflow_v2beta1/proto/validation_result_pb2.py
  88. +2 −0 dialogflow_v2beta1/proto/validation_result_pb2_grpc.py
  89. +0 −137 dialogflow_v2beta1/proto/webhook.proto
  90. +38 −5 dialogflow_v2beta1/proto/webhook_pb2.py
  91. +10 −1 dialogflow_v2beta1/types.py
  92. +1 −0 noxfile.py
  93. +0 −1 setup.cfg
  94. +7 −6 synth.metadata
  95. +8 −1 synth.py
  96. +86 −0 tests/unit/gapic/v2/test_agents_client_v2.py
  97. +1 −0 tests/unit/gapic/v2/test_contexts_client_v2.py
  98. +19 −3 tests/unit/gapic/v2/test_entity_types_client_v2.py
  99. +1 −0 tests/unit/gapic/v2/test_intents_client_v2.py
  100. +1 −0 tests/unit/gapic/v2/test_session_entity_types_client_v2.py
  101. +1 −0 tests/unit/gapic/v2/test_sessions_client_v2.py
  102. +118 −0 tests/unit/gapic/v2beta1/test_agents_client_v2beta1.py
  103. +1 −0 tests/unit/gapic/v2beta1/test_contexts_client_v2beta1.py
  104. +37 −10 tests/unit/gapic/v2beta1/test_documents_client_v2beta1.py
  105. +19 −3 tests/unit/gapic/v2beta1/test_entity_types_client_v2beta1.py
  106. +1 −0 tests/unit/gapic/v2beta1/test_intents_client_v2beta1.py
  107. +12 −3 tests/unit/gapic/v2beta1/test_knowledge_bases_client_v2beta1.py
  108. +1 −0 tests/unit/gapic/v2beta1/test_session_entity_types_client_v2beta1.py
  109. +1 −0 tests/unit/gapic/v2beta1/test_sessions_client_v2beta1.py
@@ -1,4 +1,3 @@
# Generated by synthtool. DO NOT EDIT!
include README.rst LICENSE
recursive-include google *.json *.proto
recursive-include tests *
@@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import absolute_import

from dialogflow_v2 import types

Large diffs are not rendered by default.

@@ -17,6 +17,16 @@
}
},
"methods": {
"SetAgent": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"DeleteAgent": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"GetAgent": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
@@ -13,13 +13,15 @@
# 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.

"""Accesses the google.cloud.dialogflow.v2 Contexts API."""

import functools
import pkg_resources
import warnings

from google.oauth2 import service_account
import google.api_core.client_options
import google.api_core.gapic_v1.client_info
import google.api_core.gapic_v1.config
import google.api_core.gapic_v1.method
@@ -41,6 +43,7 @@
from google.protobuf import field_mask_pb2
from google.protobuf import struct_pb2


_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("dialogflow").version


@@ -61,7 +64,7 @@ class ContextsClient(object):
matched for a ``DetectIntent`` request.
For more information about contexts, see the `Dialogflow
documentation <https://cloud.google.com/dialogflow-enterprise/docs/contexts-overview>`__.
documentation <https://cloud.google.com/dialogflow/docs/contexts-overview>`__.
"""

SERVICE_ADDRESS = "dialogflow.googleapis.com:443"
@@ -117,6 +120,7 @@ def __init__(
credentials=None,
client_config=None,
client_info=None,
client_options=None,
):
"""Constructor.
@@ -147,6 +151,9 @@ def __init__(
API requests. If ``None``, then default info will be used.
Generally, you only need to set this if you're developing
your own client library.
client_options (Union[dict, google.api_core.client_options.ClientOptions]):
Client options used to set user options on the client. API Endpoint
should be set through client_options.
"""
# Raise deprecation warnings for things we want to go away.
if client_config is not None:
@@ -165,6 +172,15 @@ def __init__(
stacklevel=2,
)

api_endpoint = self.SERVICE_ADDRESS
if client_options:
if type(client_options) == dict:
client_options = google.api_core.client_options.from_dict(
client_options
)
if client_options.api_endpoint:
api_endpoint = client_options.api_endpoint

# Instantiate the transport.
# The transport is responsible for handling serialization and
# deserialization and actually sending data to the service.
@@ -173,6 +189,7 @@ def __init__(
self.transport = transport(
credentials=credentials,
default_class=contexts_grpc_transport.ContextsGrpcTransport,
address=api_endpoint,
)
else:
if credentials:
@@ -183,7 +200,7 @@ def __init__(
self.transport = transport
else:
self.transport = contexts_grpc_transport.ContextsGrpcTransport(
address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials
address=api_endpoint, channel=channel, credentials=credentials
)

if client_info is None:
@@ -250,19 +267,19 @@ def list_contexts(
streaming is performed per-page, this determines the maximum number
of resources in a page.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
Returns:
A :class:`~google.gax.PageIterator` instance. By default, this
is an iterable of :class:`~google.cloud.dialogflow_v2.types.Context` instances.
This object can also be configured to iterate over the pages
of the response through the `options` parameter.
A :class:`~google.api_core.page_iterator.PageIterator` instance.
An iterable of :class:`~google.cloud.dialogflow_v2.types.Context` instances.
You can also iterate over the pages of the response
using its `pages` property.
Raises:
google.api_core.exceptions.GoogleAPICallError: If the request
@@ -334,8 +351,8 @@ def get_context(
name (str): Required. The name of the context. Format:
``projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>``.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
@@ -414,8 +431,8 @@ def create_context(
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.dialogflow_v2.types.Context`
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
@@ -492,8 +509,8 @@ def update_context(
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.dialogflow_v2.types.FieldMask`
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
@@ -564,8 +581,8 @@ def delete_context(
name (str): Required. The name of the context to delete. Format:
``projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>``.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
@@ -631,8 +648,8 @@ def delete_all_contexts(
parent (str): Required. The name of the session to delete all contexts from. Format:
``projects/<Project ID>/agent/sessions/<Session ID>``.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.

0 comments on commit 6222277

Please sign in to comment.
You can’t perform that action at this time.