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

docs: clarified the behavior of language_code in EventInput #475

Merged
merged 15 commits into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Prev Previous commit
Next Next commit
🦉 Updates from OwlBot post-processor
  • Loading branch information
gcf-owl-bot[bot] committed Mar 7, 2022
commit 0f8a152dc1be1d1c1e2fb629e80be653c23e2918
Original file line number Diff line number Diff line change
Expand Up @@ -189,17 +189,19 @@ def parse_conversation_dataset_path(path: str) -> Dict[str, str]:
return m.groupdict() if m else {}

@staticmethod
def conversation_model_path(project: str, conversation_model: str,) -> str:
def conversation_model_path(
project: str, location: str, conversation_model: str,
) -> str:
"""Returns a fully-qualified conversation_model string."""
return "projects/{project}/conversationModels/{conversation_model}".format(
project=project, conversation_model=conversation_model,
return "projects/{project}/locations/{location}/conversationModels/{conversation_model}".format(
project=project, location=location, conversation_model=conversation_model,
)

@staticmethod
def parse_conversation_model_path(path: str) -> Dict[str, str]:
"""Parses a conversation_model path into its component segments."""
m = re.match(
r"^projects/(?P<project>.+?)/conversationModels/(?P<conversation_model>.+?)$",
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/conversationModels/(?P<conversation_model>.+?)$",
path,
)
return m.groupdict() if m else {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,19 @@ def parse_agent_path(path: str) -> Dict[str, str]:
return m.groupdict() if m else {}

@staticmethod
def conversation_model_path(project: str, conversation_model: str,) -> str:
def conversation_model_path(
project: str, location: str, conversation_model: str,
) -> str:
"""Returns a fully-qualified conversation_model string."""
return "projects/{project}/conversationModels/{conversation_model}".format(
project=project, conversation_model=conversation_model,
return "projects/{project}/locations/{location}/conversationModels/{conversation_model}".format(
project=project, location=location, conversation_model=conversation_model,
)

@staticmethod
def parse_conversation_model_path(path: str) -> Dict[str, str]:
"""Parses a conversation_model path into its component segments."""
m = re.match(
r"^projects/(?P<project>.+?)/conversationModels/(?P<conversation_model>.+?)$",
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/conversationModels/(?P<conversation_model>.+?)$",
path,
)
return m.groupdict() if m else {}
Expand Down
28 changes: 22 additions & 6 deletions google/cloud/dialogflow_v2/types/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,12 @@ class ExportAgentRequest(proto.Message):
export the agent to. The format of this URI must be
``gs://<bucket-name>/<object-name>``. If left unspecified,
the serialized agent is returned inline.

Dialogflow performs a write operation for the Cloud Storage
object on the caller's behalf, so your request
authentication must have write permissions for the object.
For more information, see `Dialogflow access
control <https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage>`__.
"""

parent = proto.Field(proto.STRING, number=1,)
Expand Down Expand Up @@ -309,9 +315,14 @@ class ImportAgentRequest(proto.Message):
Required. The project that the agent to import is associated
with. Format: ``projects/<Project ID>``.
agent_uri (str):
The URI to a Google Cloud Storage file
containing the agent to import. Note: The URI
must start with "gs://".
The URI to a Google Cloud Storage file containing the agent
to import. Note: The URI must start with "gs://".

Dialogflow performs a read operation for the Cloud Storage
object on the caller's behalf, so your request
authentication must have read permissions for the object.
For more information, see `Dialogflow access
control <https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage>`__.

This field is a member of `oneof`_ ``agent``.
agent_content (bytes):
Expand Down Expand Up @@ -341,9 +352,14 @@ class RestoreAgentRequest(proto.Message):
Required. The project that the agent to restore is
associated with. Format: ``projects/<Project ID>``.
agent_uri (str):
The URI to a Google Cloud Storage file
containing the agent to restore. Note: The URI
must start with "gs://".
The URI to a Google Cloud Storage file containing the agent
to restore. Note: The URI must start with "gs://".

Dialogflow performs a read operation for the Cloud Storage
object on the caller's behalf, so your request
authentication must have read permissions for the object.
For more information, see `Dialogflow access
control <https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage>`__.

This field is a member of `oneof`_ ``agent``.
agent_content (bytes):
Expand Down
5 changes: 5 additions & 0 deletions google/cloud/dialogflow_v2/types/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,11 @@ class EventInput(proto.Message):
for a list of the currently supported language codes. Note
that queries in the same session do not necessarily need to
specify the same language.

This field is ignored when used in the context of a
[WebhookResponse.followup_event_input][google.cloud.dialogflow.v2.WebhookResponse.followup_event_input]
field, because the language was already defined in the
originating detect intent request.
"""

name = proto.Field(proto.STRING, number=1,)
Expand Down
17 changes: 0 additions & 17 deletions owl-bot-staging/v2/.coveragerc

This file was deleted.

33 changes: 0 additions & 33 deletions owl-bot-staging/v2/.flake8

This file was deleted.

2 changes: 0 additions & 2 deletions owl-bot-staging/v2/MANIFEST.in

This file was deleted.

49 changes: 0 additions & 49 deletions owl-bot-staging/v2/README.rst

This file was deleted.

Loading