diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/__init__.py index 7db66c4dfd77..936746e45a28 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/__init__.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/__init__.py @@ -1477,6 +1477,8 @@ ReservationAggregatedList, ReservationBlock, ReservationBlockPhysicalTopology, + ReservationBlockPhysicalTopologyInstance, + ReservationBlockPhysicalTopologyInstancePhysicalHostTopology, ReservationBlocksGetResponse, ReservationBlocksListResponse, ReservationList, @@ -3442,6 +3444,8 @@ "ReservationAggregatedList", "ReservationBlock", "ReservationBlockPhysicalTopology", + "ReservationBlockPhysicalTopologyInstance", + "ReservationBlockPhysicalTopologyInstancePhysicalHostTopology", "ReservationBlocksClient", "ReservationBlocksGetResponse", "ReservationBlocksListResponse", diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/gapic_version.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/gapic_version.py index ecfa5bc16606..20a9cd975b02 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/gapic_version.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "0.1.3" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/__init__.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/__init__.py index 752bbc69eddf..4e2068910abb 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/__init__.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/__init__.py @@ -1349,6 +1349,8 @@ ReservationAggregatedList, ReservationBlock, ReservationBlockPhysicalTopology, + ReservationBlockPhysicalTopologyInstance, + ReservationBlockPhysicalTopologyInstancePhysicalHostTopology, ReservationBlocksGetResponse, ReservationBlocksListResponse, ReservationList, @@ -3228,6 +3230,8 @@ "ReservationAggregatedList", "ReservationBlock", "ReservationBlockPhysicalTopology", + "ReservationBlockPhysicalTopologyInstance", + "ReservationBlockPhysicalTopologyInstancePhysicalHostTopology", "ReservationBlocksGetResponse", "ReservationBlocksListResponse", "ReservationList", diff --git a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/compute.py b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/compute.py index e6dda3672e6d..5080f367fabf 100644 --- a/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/compute.py +++ b/packages/google-cloud-compute-v1beta/google/cloud/compute_v1beta/types/compute.py @@ -1359,6 +1359,8 @@ "ReservationAggregatedList", "ReservationBlock", "ReservationBlockPhysicalTopology", + "ReservationBlockPhysicalTopologyInstance", + "ReservationBlockPhysicalTopologyInstancePhysicalHostTopology", "ReservationBlocksGetResponse", "ReservationBlocksListResponse", "ReservationList", @@ -40044,6 +40046,9 @@ class GetReservationBlockRequest(proto.Message): r"""A request message for ReservationBlocks.Get. See the method description for details. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: project (str): Project ID for this request. @@ -40053,11 +40058,38 @@ class GetReservationBlockRequest(proto.Message): reservation_block (str): The name of the reservation block. Name should conform to RFC1035 or be a resource ID. + view (str): + View of the Block. + Check the View enum for the list of possible + values. + + This field is a member of `oneof`_ ``_view``. zone (str): Name of the zone for this request. Zone name should conform to RFC1035. """ + class View(proto.Enum): + r"""View of the Block. + + Values: + UNDEFINED_VIEW (0): + A value indicating that the enum field is not + set. + BASIC (62970894): + This view includes basic information about + the reservation block + BLOCK_VIEW_UNSPECIFIED (275070479): + The default / unset value. The API will + default to the BASIC view. + FULL (2169487): + Includes detailed topology view. + """ + UNDEFINED_VIEW = 0 + BASIC = 62970894 + BLOCK_VIEW_UNSPECIFIED = 275070479 + FULL = 2169487 + project: str = proto.Field( proto.STRING, number=227560217, @@ -40070,6 +40102,11 @@ class GetReservationBlockRequest(proto.Message): proto.STRING, number=532832858, ) + view: str = proto.Field( + proto.STRING, + number=3619493, + optional=True, + ) zone: str = proto.Field( proto.STRING, number=3744684, @@ -102773,6 +102810,9 @@ class ReservationBlockPhysicalTopology(proto.Message): The cluster name of the reservation block. This field is a member of `oneof`_ ``_cluster``. + instances (MutableSequence[google.cloud.compute_v1beta.types.ReservationBlockPhysicalTopologyInstance]): + The detailed instances information for a + given Block """ block: str = proto.Field( @@ -102785,6 +102825,82 @@ class ReservationBlockPhysicalTopology(proto.Message): number=335221242, optional=True, ) + instances: MutableSequence[ + "ReservationBlockPhysicalTopologyInstance" + ] = proto.RepeatedField( + proto.MESSAGE, + number=29097598, + message="ReservationBlockPhysicalTopologyInstance", + ) + + +class ReservationBlockPhysicalTopologyInstance(proto.Message): + r"""The instances information for a given Block + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + instance_id (int): + The InstanceId of the instance + + This field is a member of `oneof`_ ``_instance_id``. + physical_host_topology (google.cloud.compute_v1beta.types.ReservationBlockPhysicalTopologyInstancePhysicalHostTopology): + The PhysicalHostTopology of instances within + a Block resource. + + This field is a member of `oneof`_ ``_physical_host_topology``. + project_id (int): + Project where the instance lives + + This field is a member of `oneof`_ ``_project_id``. + """ + + instance_id: int = proto.Field( + proto.UINT64, + number=45488389, + optional=True, + ) + physical_host_topology: "ReservationBlockPhysicalTopologyInstancePhysicalHostTopology" = proto.Field( + proto.MESSAGE, + number=390842814, + optional=True, + message="ReservationBlockPhysicalTopologyInstancePhysicalHostTopology", + ) + project_id: int = proto.Field( + proto.UINT64, + number=177513473, + optional=True, + ) + + +class ReservationBlockPhysicalTopologyInstancePhysicalHostTopology(proto.Message): + r"""The PhysicalHostTopology of the instance within a Block + resource. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + host (str): + Host hash for a given instance + + This field is a member of `oneof`_ ``_host``. + sub_block (str): + Sub block hash for a given instance + + This field is a member of `oneof`_ ``_sub_block``. + """ + + host: str = proto.Field( + proto.STRING, + number=3208616, + optional=True, + ) + sub_block: str = proto.Field( + proto.STRING, + number=478033358, + optional=True, + ) class ReservationBlocksGetResponse(proto.Message): diff --git a/packages/google-cloud-compute-v1beta/samples/generated_samples/snippet_metadata_google.cloud.compute.v1beta.json b/packages/google-cloud-compute-v1beta/samples/generated_samples/snippet_metadata_google.cloud.compute.v1beta.json index 8349addc726d..2f1169244dc3 100644 --- a/packages/google-cloud-compute-v1beta/samples/generated_samples/snippet_metadata_google.cloud.compute.v1beta.json +++ b/packages/google-cloud-compute-v1beta/samples/generated_samples/snippet_metadata_google.cloud.compute.v1beta.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-compute-v1beta", - "version": "0.1.3" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_blocks.py b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_blocks.py index e385cb7fa49d..feec31c43ea4 100644 --- a/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_blocks.py +++ b/packages/google-cloud-compute-v1beta/tests/unit/gapic/compute_v1beta/test_reservation_blocks.py @@ -1047,6 +1047,8 @@ def test_get_rest_required_fields(request_type=compute.GetReservationBlockReques unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() ).get._get_unset_required_fields(jsonified_request) + # Check that path parameters and body parameters are not mixing in. + assert not set(unset_fields) - set(("view",)) jsonified_request.update(unset_fields) # verify required fields with non-default values are left alone @@ -1108,7 +1110,7 @@ def test_get_rest_unset_required_fields(): unset_fields = transport.get._get_unset_required_fields({}) assert set(unset_fields) == ( - set(()) + set(("view",)) & set( ( "project",