Skip to content

Commit

Permalink
feat: add satisfies_pzs output only field (#614)
Browse files Browse the repository at this point in the history
* feat: Publish new fields

PiperOrigin-RevId: 463378622

Source-Link: googleapis/googleapis@8229ab4

Source-Link: googleapis/googleapis-gen@bb82d04
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmI4MmQwNDIyYjhmMmY0MTMxNTg2MjNhOWQxZTA5NDIyYjI2MDRiNSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

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] committed Jul 27, 2022
1 parent 8a0e7d8 commit 7dc1469
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
9 changes: 9 additions & 0 deletions google/cloud/bigtable_admin_v2/types/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ class Instance(proto.Message):
this Instance was created. For instances created before this
field was added (August 2021), this value is
``seconds: 0, nanos: 1``.
satisfies_pzs (bool):
Output only. Reserved for future use.
This field is a member of `oneof`_ ``_satisfies_pzs``.
"""

class State(proto.Enum):
Expand Down Expand Up @@ -113,6 +117,11 @@ class Type(proto.Enum):
number=7,
message=timestamp_pb2.Timestamp,
)
satisfies_pzs = proto.Field(
proto.BOOL,
number=8,
optional=True,
)


class AutoscalingTargets(proto.Message):
Expand Down
2 changes: 1 addition & 1 deletion scripts/fixup_bigtable_admin_v2_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class bigtable_adminCallTransformer(cst.CSTTransformer):
'update_app_profile': ('app_profile', 'update_mask', 'ignore_warnings', ),
'update_backup': ('backup', 'update_mask', ),
'update_cluster': ('name', 'location', 'state', 'serve_nodes', 'cluster_config', 'default_storage_type', 'encryption_config', ),
'update_instance': ('display_name', 'name', 'state', 'type_', 'labels', 'create_time', ),
'update_instance': ('display_name', 'name', 'state', 'type_', 'labels', 'create_time', 'satisfies_pzs', ),
}

def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,7 @@ def test_get_instance(request_type, transport: str = "grpc"):
display_name="display_name_value",
state=instance.Instance.State.READY,
type_=instance.Instance.Type.PRODUCTION,
satisfies_pzs=True,
)
response = client.get_instance(request)

Expand All @@ -1025,6 +1026,7 @@ def test_get_instance(request_type, transport: str = "grpc"):
assert response.display_name == "display_name_value"
assert response.state == instance.Instance.State.READY
assert response.type_ == instance.Instance.Type.PRODUCTION
assert response.satisfies_pzs is True


def test_get_instance_empty_call():
Expand Down Expand Up @@ -1066,6 +1068,7 @@ async def test_get_instance_async(
display_name="display_name_value",
state=instance.Instance.State.READY,
type_=instance.Instance.Type.PRODUCTION,
satisfies_pzs=True,
)
)
response = await client.get_instance(request)
Expand All @@ -1081,6 +1084,7 @@ async def test_get_instance_async(
assert response.display_name == "display_name_value"
assert response.state == instance.Instance.State.READY
assert response.type_ == instance.Instance.Type.PRODUCTION
assert response.satisfies_pzs is True


@pytest.mark.asyncio
Expand Down Expand Up @@ -1490,6 +1494,7 @@ def test_update_instance(request_type, transport: str = "grpc"):
display_name="display_name_value",
state=instance.Instance.State.READY,
type_=instance.Instance.Type.PRODUCTION,
satisfies_pzs=True,
)
response = client.update_instance(request)

Expand All @@ -1504,6 +1509,7 @@ def test_update_instance(request_type, transport: str = "grpc"):
assert response.display_name == "display_name_value"
assert response.state == instance.Instance.State.READY
assert response.type_ == instance.Instance.Type.PRODUCTION
assert response.satisfies_pzs is True


def test_update_instance_empty_call():
Expand Down Expand Up @@ -1544,6 +1550,7 @@ async def test_update_instance_async(
display_name="display_name_value",
state=instance.Instance.State.READY,
type_=instance.Instance.Type.PRODUCTION,
satisfies_pzs=True,
)
)
response = await client.update_instance(request)
Expand All @@ -1559,6 +1566,7 @@ async def test_update_instance_async(
assert response.display_name == "display_name_value"
assert response.state == instance.Instance.State.READY
assert response.type_ == instance.Instance.Type.PRODUCTION
assert response.satisfies_pzs is True


@pytest.mark.asyncio
Expand Down

0 comments on commit 7dc1469

Please sign in to comment.