Skip to content

Commit

Permalink
feat: [google-cloud-dialogflow] created new boolean fields in convers…
Browse files Browse the repository at this point in the history
…ation model for zone isolation and zone separation compliance status (#13096)

BEGIN_COMMIT_OVERRIDE
feat: created new boolean fields in conversation model for zone
isolation and zone separation compliance status
END_COMMIT_OVERRIDE

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 676665642

Source-Link:
googleapis/googleapis@f87ae44

Source-Link:
googleapis/googleapis-gen@d66ac41
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3cvLk93bEJvdC55YW1sIiwiaCI6ImQ2NmFjNDFhYTA3MmJiYzQzNjdmN2QyNzU4ZDBkMGJhN2E3MDk0YTUifQ==

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Sep 20, 2024
1 parent 786ac0e commit 1f8b564
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ class ConversationModel(proto.Message):
Metadata for smart reply models.
This field is a member of `oneof`_ ``model_metadata``.
satisfies_pzs (bool):
Output only. A read only boolean field
reflecting Zone Separation status of the model.
This field is a member of `oneof`_ ``_satisfies_pzs``.
satisfies_pzi (bool):
Output only. A read only boolean field
reflecting Zone Isolation status of the model.
This field is a member of `oneof`_ ``_satisfies_pzi``.
"""

class State(proto.Enum):
Expand Down Expand Up @@ -183,6 +193,16 @@ class ModelType(proto.Enum):
oneof="model_metadata",
message="SmartReplyModelMetadata",
)
satisfies_pzs: bool = proto.Field(
proto.BOOL,
number=25,
optional=True,
)
satisfies_pzi: bool = proto.Field(
proto.BOOL,
number=26,
optional=True,
)


class ConversationModelEvaluation(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,8 @@ def test_get_conversation_model(request_type, transport: str = "grpc"):
display_name="display_name_value",
state=conversation_model.ConversationModel.State.CREATING,
language_code="language_code_value",
satisfies_pzs=True,
satisfies_pzi=True,
)
response = client.get_conversation_model(request)

Expand All @@ -1629,6 +1631,8 @@ def test_get_conversation_model(request_type, transport: str = "grpc"):
assert response.display_name == "display_name_value"
assert response.state == conversation_model.ConversationModel.State.CREATING
assert response.language_code == "language_code_value"
assert response.satisfies_pzs is True
assert response.satisfies_pzi is True


def test_get_conversation_model_empty_call():
Expand Down Expand Up @@ -1742,6 +1746,8 @@ async def test_get_conversation_model_empty_call_async():
display_name="display_name_value",
state=conversation_model.ConversationModel.State.CREATING,
language_code="language_code_value",
satisfies_pzs=True,
satisfies_pzi=True,
)
)
response = await client.get_conversation_model()
Expand Down Expand Up @@ -1817,6 +1823,8 @@ async def test_get_conversation_model_async(
display_name="display_name_value",
state=conversation_model.ConversationModel.State.CREATING,
language_code="language_code_value",
satisfies_pzs=True,
satisfies_pzi=True,
)
)
response = await client.get_conversation_model(request)
Expand All @@ -1833,6 +1841,8 @@ async def test_get_conversation_model_async(
assert response.display_name == "display_name_value"
assert response.state == conversation_model.ConversationModel.State.CREATING
assert response.language_code == "language_code_value"
assert response.satisfies_pzs is True
assert response.satisfies_pzi is True


@pytest.mark.asyncio
Expand Down Expand Up @@ -5028,6 +5038,8 @@ def test_create_conversation_model_rest(request_type):
"language_code": "language_code_value",
"article_suggestion_model_metadata": {"training_model_type": 2},
"smart_reply_model_metadata": {"training_model_type": 2},
"satisfies_pzs": True,
"satisfies_pzi": True,
}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
Expand Down Expand Up @@ -5414,6 +5426,8 @@ def test_get_conversation_model_rest(request_type):
display_name="display_name_value",
state=conversation_model.ConversationModel.State.CREATING,
language_code="language_code_value",
satisfies_pzs=True,
satisfies_pzi=True,
)

# Wrap the value into a proper Response obj
Expand All @@ -5433,6 +5447,8 @@ def test_get_conversation_model_rest(request_type):
assert response.display_name == "display_name_value"
assert response.state == conversation_model.ConversationModel.State.CREATING
assert response.language_code == "language_code_value"
assert response.satisfies_pzs is True
assert response.satisfies_pzi is True


def test_get_conversation_model_rest_use_cached_wrapped_rpc():
Expand Down

0 comments on commit 1f8b564

Please sign in to comment.