Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.

Commit

Permalink
Regenerate Dialogflow. (#123)
Browse files Browse the repository at this point in the history
* Regenerate Dialogflow.

* Fix raw html directives.

* Add proto files.
  • Loading branch information
busunkim96 authored May 6, 2019
1 parent 8c9c870 commit bec90b9
Show file tree
Hide file tree
Showing 114 changed files with 13,909 additions and 4,098 deletions.
4 changes: 3 additions & 1 deletion dialogflow_v2/__init__.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright 2018 Google LLC
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Empty file modified dialogflow_v2/gapic/__init__.py
100755 → 100644
Empty file.
278 changes: 184 additions & 94 deletions dialogflow_v2/gapic/agents_client.py
100755 → 100644

Large diffs are not rendered by default.

Empty file modified dialogflow_v2/gapic/agents_client_config.py
100755 → 100644
Empty file.
227 changes: 161 additions & 66 deletions dialogflow_v2/gapic/contexts_client.py
100755 → 100644

Large diffs are not rendered by default.

Empty file modified dialogflow_v2/gapic/contexts_client_config.py
100755 → 100644
Empty file.
443 changes: 292 additions & 151 deletions dialogflow_v2/gapic/entity_types_client.py
100755 → 100644

Large diffs are not rendered by default.

Empty file modified dialogflow_v2/gapic/entity_types_client_config.py
100755 → 100644
Empty file.
356 changes: 201 additions & 155 deletions dialogflow_v2/gapic/enums.py
100755 → 100644

Large diffs are not rendered by default.

330 changes: 220 additions & 110 deletions dialogflow_v2/gapic/intents_client.py
100755 → 100644

Large diffs are not rendered by default.

Empty file modified dialogflow_v2/gapic/intents_client_config.py
100755 → 100644
Empty file.
172 changes: 124 additions & 48 deletions dialogflow_v2/gapic/session_entity_types_client.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright 2018 Google LLC
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -21,6 +23,7 @@
import google.api_core.gapic_v1.client_info
import google.api_core.gapic_v1.config
import google.api_core.gapic_v1.method
import google.api_core.gapic_v1.routing_header
import google.api_core.grpc_helpers
import google.api_core.page_iterator
import google.api_core.path_template
Expand Down Expand Up @@ -56,12 +59,12 @@ class SessionEntityTypesClient(object):
actionable data for your application.
Session entity types are referred to as **User** entity types and are
entities that are built for an individual user such as
favorites, preferences, playlists, and so on. You can redefine a session
entity type at the session level.
entities that are built for an individual user such as favorites,
preferences, playlists, and so on. You can redefine a session entity
type at the session level.
For more information about entity types, see the
`Dialogflow documentation <https://dialogflow.com/docs/entities>`__.
For more information about entity types, see the `Dialogflow
documentation <https://cloud.google.com/dialogflow-enterprise/docs/entities-overview>`__.
"""

SERVICE_ADDRESS = 'dialogflow.googleapis.com:443'
Expand Down Expand Up @@ -115,7 +118,7 @@ def __init__(self,
transport=None,
channel=None,
credentials=None,
client_config=session_entity_types_client_config.config,
client_config=None,
client_info=None):
"""Constructor.
Expand Down Expand Up @@ -148,13 +151,19 @@ def __init__(self,
your own client library.
"""
# Raise deprecation warnings for things we want to go away.
if client_config:
if client_config is not None:
warnings.warn('The `client_config` argument is deprecated.',
PendingDeprecationWarning)
PendingDeprecationWarning,
stacklevel=2)
else:
client_config = session_entity_types_client_config.config

if channel:
warnings.warn(
'The `channel` argument is deprecated; use '
'`transport` instead.', PendingDeprecationWarning)
'`transport` instead.',
PendingDeprecationWarning,
stacklevel=2)

# Instantiate the transport.
# The transport is responsible for handling serialization and
Expand All @@ -180,9 +189,10 @@ def __init__(self,
)

if client_info is None:
client_info = (
google.api_core.gapic_v1.client_info.DEFAULT_CLIENT_INFO)
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
client_info = google.api_core.gapic_v1.client_info.ClientInfo(
gapic_version=_GAPIC_LIBRARY_VERSION, )
else:
client_info.gapic_version = _GAPIC_LIBRARY_VERSION
self._client_info = client_info

# Parse out the default settings for retry and timeout for each RPC
Expand Down Expand Up @@ -225,14 +235,14 @@ def list_session_entity_types(
>>> # Alternatively:
>>>
>>> # Iterate over results one page at a time
>>> for page in client.list_session_entity_types(parent, options=CallOptions(page_token=INITIAL_PAGE)):
>>> for page in client.list_session_entity_types(parent).pages:
... for element in page:
... # process element
... pass
Args:
parent (str): Required. The session to list all session entity types from.
Format: ``projects/<Project ID>/agent/sessions/<Session ID>``.
parent (str): Required. The session to list all session entity types from. Format:
``projects/<Project ID>/agent/sessions/<Session ID>``.
page_size (int): The maximum number of resources contained in the
underlying API response. If page streaming is performed per-
resource, this parameter does not affect the return value. If page
Expand Down Expand Up @@ -265,17 +275,29 @@ def list_session_entity_types(
self._inner_api_calls[
'list_session_entity_types'] = google.api_core.gapic_v1.method.wrap_method(
self.transport.list_session_entity_types,
default_retry=self._method_configs[
'ListSessionEntityTypes'].retry,
default_timeout=self._method_configs[
'ListSessionEntityTypes'].timeout,
default_retry=self.
_method_configs['ListSessionEntityTypes'].retry,
default_timeout=self.
_method_configs['ListSessionEntityTypes'].timeout,
client_info=self._client_info,
)

request = session_entity_type_pb2.ListSessionEntityTypesRequest(
parent=parent,
page_size=page_size,
)
if metadata is None:
metadata = []
metadata = list(metadata)
try:
routing_header = [('parent', parent)]
except AttributeError:
pass
else:
routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
routing_header)
metadata.append(routing_metadata)

iterator = google.api_core.page_iterator.GRPCIterator(
client=None,
method=functools.partial(
Expand Down Expand Up @@ -310,8 +332,7 @@ def get_session_entity_type(
Args:
name (str): Required. The name of the session entity type. Format:
``projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
Display Name>``.
``projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>``.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
Expand All @@ -336,15 +357,27 @@ def get_session_entity_type(
self._inner_api_calls[
'get_session_entity_type'] = google.api_core.gapic_v1.method.wrap_method(
self.transport.get_session_entity_type,
default_retry=self._method_configs['GetSessionEntityType']
.retry,
default_timeout=self._method_configs[
'GetSessionEntityType'].timeout,
default_retry=self._method_configs['GetSessionEntityType'].
retry,
default_timeout=self.
_method_configs['GetSessionEntityType'].timeout,
client_info=self._client_info,
)

request = session_entity_type_pb2.GetSessionEntityTypeRequest(
name=name, )
if metadata is None:
metadata = []
metadata = list(metadata)
try:
routing_header = [('name', name)]
except AttributeError:
pass
else:
routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
routing_header)
metadata.append(routing_metadata)

return self._inner_api_calls['get_session_entity_type'](
request, retry=retry, timeout=timeout, metadata=metadata)

Expand All @@ -358,22 +391,26 @@ def create_session_entity_type(
"""
Creates a session entity type.
If the specified session entity type already exists, overrides the session
entity type.
Example:
>>> import dialogflow_v2
>>>
>>> client = dialogflow_v2.SessionEntityTypesClient()
>>>
>>> parent = client.session_path('[PROJECT]', '[SESSION]')
>>>
>>> # TODO: Initialize ``session_entity_type``:
>>> # TODO: Initialize `session_entity_type`:
>>> session_entity_type = {}
>>>
>>> response = client.create_session_entity_type(parent, session_entity_type)
Args:
parent (str): Required. The session to create a session entity type for.
Format: ``projects/<Project ID>/agent/sessions/<Session ID>``.
parent (str): Required. The session to create a session entity type for. Format:
``projects/<Project ID>/agent/sessions/<Session ID>``.
session_entity_type (Union[dict, ~google.cloud.dialogflow_v2.types.SessionEntityType]): Required. The session entity type to create.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.dialogflow_v2.types.SessionEntityType`
retry (Optional[google.api_core.retry.Retry]): A retry object used
Expand All @@ -400,17 +437,29 @@ def create_session_entity_type(
self._inner_api_calls[
'create_session_entity_type'] = google.api_core.gapic_v1.method.wrap_method(
self.transport.create_session_entity_type,
default_retry=self._method_configs[
'CreateSessionEntityType'].retry,
default_timeout=self._method_configs[
'CreateSessionEntityType'].timeout,
default_retry=self.
_method_configs['CreateSessionEntityType'].retry,
default_timeout=self.
_method_configs['CreateSessionEntityType'].timeout,
client_info=self._client_info,
)

request = session_entity_type_pb2.CreateSessionEntityTypeRequest(
parent=parent,
session_entity_type=session_entity_type,
)
if metadata is None:
metadata = []
metadata = list(metadata)
try:
routing_header = [('parent', parent)]
except AttributeError:
pass
else:
routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
routing_header)
metadata.append(routing_metadata)

return self._inner_api_calls['create_session_entity_type'](
request, retry=retry, timeout=timeout, metadata=metadata)

Expand All @@ -429,18 +478,19 @@ def update_session_entity_type(
>>>
>>> client = dialogflow_v2.SessionEntityTypesClient()
>>>
>>> # TODO: Initialize ``session_entity_type``:
>>> # TODO: Initialize `session_entity_type`:
>>> session_entity_type = {}
>>>
>>> response = client.update_session_entity_type(session_entity_type)
Args:
session_entity_type (Union[dict, ~google.cloud.dialogflow_v2.types.SessionEntityType]): Required. The entity type to update. Format:
``projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
Display Name>``.
``projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>``.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.dialogflow_v2.types.SessionEntityType`
update_mask (Union[dict, ~google.cloud.dialogflow_v2.types.FieldMask]): Optional. The mask to control which fields get updated.
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
Expand All @@ -467,17 +517,30 @@ def update_session_entity_type(
self._inner_api_calls[
'update_session_entity_type'] = google.api_core.gapic_v1.method.wrap_method(
self.transport.update_session_entity_type,
default_retry=self._method_configs[
'UpdateSessionEntityType'].retry,
default_timeout=self._method_configs[
'UpdateSessionEntityType'].timeout,
default_retry=self.
_method_configs['UpdateSessionEntityType'].retry,
default_timeout=self.
_method_configs['UpdateSessionEntityType'].timeout,
client_info=self._client_info,
)

request = session_entity_type_pb2.UpdateSessionEntityTypeRequest(
session_entity_type=session_entity_type,
update_mask=update_mask,
)
if metadata is None:
metadata = []
metadata = list(metadata)
try:
routing_header = [('session_entity_type.name',
session_entity_type.name)]
except AttributeError:
pass
else:
routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
routing_header)
metadata.append(routing_metadata)

return self._inner_api_calls['update_session_entity_type'](
request, retry=retry, timeout=timeout, metadata=metadata)

Expand All @@ -501,8 +564,7 @@ def delete_session_entity_type(
Args:
name (str): Required. The name of the entity type to delete. Format:
``projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
Display Name>``.
``projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>``.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
Expand All @@ -524,14 +586,28 @@ def delete_session_entity_type(
self._inner_api_calls[
'delete_session_entity_type'] = google.api_core.gapic_v1.method.wrap_method(
self.transport.delete_session_entity_type,
default_retry=self._method_configs[
'DeleteSessionEntityType'].retry,
default_timeout=self._method_configs[
'DeleteSessionEntityType'].timeout,
default_retry=self.
_method_configs['DeleteSessionEntityType'].retry,
default_timeout=self.
_method_configs['DeleteSessionEntityType'].timeout,
client_info=self._client_info,
)

request = session_entity_type_pb2.DeleteSessionEntityTypeRequest(
name=name, )
self._inner_api_calls['delete_session_entity_type'](
request, retry=retry, timeout=timeout, metadata=metadata)
if metadata is None:
metadata = []
metadata = list(metadata)
try:
routing_header = [('name', name)]
except AttributeError:
pass
else:
routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
routing_header)
metadata.append(routing_metadata)

self._inner_api_calls['delete_session_entity_type'](request,
retry=retry,
timeout=timeout,
metadata=metadata)
Empty file modified dialogflow_v2/gapic/session_entity_types_client_config.py
100755 → 100644
Empty file.
Loading

0 comments on commit bec90b9

Please sign in to comment.