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

regenerate v2beta1, add synth script #73

Merged
merged 6 commits into from
Jul 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ omit =
*/proto/*

[report]
fail_under = 90
fail_under = 80

This comment was marked as spam.

show_missing = True
exclude_lines =
# Re-enable the standard pragma
Expand Down
1 change: 0 additions & 1 deletion dialogflow_v2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from __future__ import absolute_import

from dialogflow_v2 import types
from dialogflow_v2.gapic import agents_client
from dialogflow_v2.gapic import contexts_client
from dialogflow_v2.gapic import entity_types_client
Expand Down
307 changes: 188 additions & 119 deletions dialogflow_v2/gapic/agents_client.py

Large diffs are not rendered by default.

293 changes: 185 additions & 108 deletions dialogflow_v2/gapic/contexts_client.py

Large diffs are not rendered by default.

417 changes: 262 additions & 155 deletions dialogflow_v2/gapic/entity_types_client.py

Large diffs are not rendered by default.

188 changes: 127 additions & 61 deletions dialogflow_v2/gapic/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
# limitations under the License.
"""Wrappers for protocol buffer enum types."""

import enum

class NullValue(object):

class NullValue(enum.IntEnum):
"""
``NullValue`` is a singleton enumeration to represent the null value for the
``Value`` type union.
Expand All @@ -27,7 +29,7 @@ class NullValue(object):
NULL_VALUE = 0


class IntentView(object):
class IntentView(enum.IntEnum):
"""
Represents the options for views of an intent.
An intent can be a sizable object. Therefore, we provide a resource view that
Expand All @@ -41,7 +43,7 @@ class IntentView(object):
INTENT_VIEW_FULL = 1


class AudioEncoding(object):
class AudioEncoding(enum.IntEnum):
"""
Audio encoding of the audio content sent in the conversational query request.
Refer to the `Cloud Speech API documentation <https://cloud.google.com/speech/docs/basics>`_ for more
Expand Down Expand Up @@ -85,8 +87,61 @@ class AudioEncoding(object):
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7


class EntityType(object):
class Kind(enum.IntEnum):
"""
Represents kinds of entities.

Attributes:
KIND_UNSPECIFIED (int): Not specified. This value should be never used.
KIND_MAP (int): Map entity types allow mapping of a group of synonyms to a canonical
value.
KIND_LIST (int): List entity types contain a set of entries that do not map to canonical
values. However, list entity types can contain references to other entity
types (with or without aliases).
"""
KIND_UNSPECIFIED = 0
KIND_MAP = 1
KIND_LIST = 2

class AutoExpansionMode(enum.IntEnum):
"""
Represents different entity type expansion modes. Automated expansion
allows an agent to recognize values that have not been explicitly listed in
the entity (for example, new kinds of shopping list items).

Attributes:
AUTO_EXPANSION_MODE_UNSPECIFIED (int): Auto expansion disabled for the entity.
AUTO_EXPANSION_MODE_DEFAULT (int): Allows an agent to recognize values that have not been explicitly
listed in the entity.
"""
AUTO_EXPANSION_MODE_UNSPECIFIED = 0
AUTO_EXPANSION_MODE_DEFAULT = 1


class SessionEntityType(object):
class EntityOverrideMode(enum.IntEnum):
"""
The types of modifications for a session entity type.

Attributes:
ENTITY_OVERRIDE_MODE_UNSPECIFIED (int): Not specified. This value should be never used.
ENTITY_OVERRIDE_MODE_OVERRIDE (int): The collection of session entities overrides the collection of entities
in the corresponding developer entity type.
ENTITY_OVERRIDE_MODE_SUPPLEMENT (int): The collection of session entities extends the collection of entities in
the corresponding developer entity type.
Calls to ``ListSessionEntityTypes``, ``GetSessionEntityType``,
``CreateSessionEntityType`` and ``UpdateSessionEntityType`` return the full
collection of entities from the developer entity type in the agent's
default language and the session entity type.
"""
ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0
ENTITY_OVERRIDE_MODE_OVERRIDE = 1
ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2


class Intent(object):
class WebhookState(object):
class WebhookState(enum.IntEnum):
"""
Represents the different states that webhooks can be in.

Expand All @@ -101,7 +156,7 @@ class WebhookState(object):
WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2

class TrainingPhrase(object):
class Type(object):
class Type(enum.IntEnum):
"""
Represents different types of training phrases.

Expand All @@ -117,7 +172,7 @@ class Type(object):
TEMPLATE = 2

class Message(object):
class Platform(object):
class Platform(enum.IntEnum):
"""
Represents different platforms that a rich message can be intended for.

Expand All @@ -131,6 +186,70 @@ class Platform(object):
LINE (int): Line.
VIBER (int): Viber.
ACTIONS_ON_GOOGLE (int): Actions on Google.
When using Actions on Google, you can choose one of the specific
Intent.Message types that mention support for Actions on Google,
or you can use the advanced Intent.Message.payload field.
The payload field provides access to AoG features not available in the
specific message types.
If using the Intent.Message.payload field, it should have a structure
similar to the JSON message shown here. For more information, see
[Actions on Google Webhook
Format](https://developers.google.com/actions/dialogflow/webhook)
<pre>{
\"expectUserResponse\": true,
\"isSsml\": false,
\"noInputPrompts\": [],
\"richResponse\": {
::

\"items\": [
{
\"simpleResponse\": {
\"displayText\": \"hi\",
\"textToSpeech\": \"hello\"
}
}
],
\"suggestions\": [
{
\"title\": \"Say this\"
},
{
\"title\": \"or this\"
}
]
},
\"systemIntent\": {
::

\"data\": {
\"@type\": \"type.googleapis.com/google.actions.v2.OptionValueSpec\",
\"listSelect\": {
\"items\": [
{
\"optionInfo\": {
\"key\": \"key1\",
\"synonyms\": [
\"key one\"
]
},
\"title\": \"must not be empty, but unique\"
},
{
\"optionInfo\": {
\"key\": \"key2\",
\"synonyms\": [
\"key two\"
]
},
\"title\": \"must not be empty, but unique\"
}
]
}
},
\"intent\": \"actions.intent.OPTION\"
}
}</pre>
"""
PLATFORM_UNSPECIFIED = 0
FACEBOOK = 1
Expand All @@ -143,61 +262,8 @@ class Platform(object):
ACTIONS_ON_GOOGLE = 8


class EntityType(object):
class Kind(object):
"""
Represents kinds of entities.

Attributes:
KIND_UNSPECIFIED (int): Not specified. This value should be never used.
KIND_MAP (int): Map entity types allow mapping of a group of synonyms to a canonical
value.
KIND_LIST (int): List entity types contain a set of entries that do not map to canonical
values. However, list entity types can contain references to other entity
types (with or without aliases).
"""
KIND_UNSPECIFIED = 0
KIND_MAP = 1
KIND_LIST = 2

class AutoExpansionMode(object):
"""
Represents different entity type expansion modes. Automated expansion
allows an agent to recognize values that have not been explicitly listed in
the entity (for example, new kinds of shopping list items).

Attributes:
AUTO_EXPANSION_MODE_UNSPECIFIED (int): Auto expansion disabled for the entity.
AUTO_EXPANSION_MODE_DEFAULT (int): Allows an agent to recognize values that have not been explicitly
listed in the entity.
"""
AUTO_EXPANSION_MODE_UNSPECIFIED = 0
AUTO_EXPANSION_MODE_DEFAULT = 1


class SessionEntityType(object):
class EntityOverrideMode(object):
"""
The types of modifications for a session entity type.

Attributes:
ENTITY_OVERRIDE_MODE_UNSPECIFIED (int): Not specified. This value should be never used.
ENTITY_OVERRIDE_MODE_OVERRIDE (int): The collection of session entities overrides the collection of entities
in the corresponding developer entity type.
ENTITY_OVERRIDE_MODE_SUPPLEMENT (int): The collection of session entities extends the collection of entities in
the corresponding developer entity type.
Calls to ``ListSessionEntityTypes``, ``GetSessionEntityType``,
``CreateSessionEntityType`` and ``UpdateSessionEntityType`` return the full
collection of entities from the developer entity type in the agent's
default language and the session entity type.
"""
ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0
ENTITY_OVERRIDE_MODE_OVERRIDE = 1
ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2


class StreamingRecognitionResult(object):
class MessageType(object):
class MessageType(enum.IntEnum):
"""
Type of the response message.

Expand All @@ -218,7 +284,7 @@ class MessageType(object):


class Agent(object):
class MatchMode(object):
class MatchMode(enum.IntEnum):
"""
Match mode determines how intents are detected from user queries.

Expand Down